converta o código assembly para c++ int sub1001BE60() .text:1001BE60 sub1001BE60 proc…
- User
converta o código assembly para c++
int sub_1001BE60() .text:1001BE60 sub_1001BE60 proc near ; CODE XREF: DllMain(x,x,x)+18↑p .text:1001BE60 .text:1001BE60 ArgList = byte ptr -14A4h .text:1001BE60 var_14A0 = byte ptr -14A0h .text:1001BE60 .text:1001BE60 push ebp .text:1001BE61 mov ebp, esp .text:1001BE63 and esp, 0FFFFFFF8h .text:1001BE66 mov eax, 14A4h .text:1001BE6B call __alloca_probe .text:1001BE70 push ebx .text:1001BE71 push esi .text:1001BE72 push edi .text:1001BE73 push 104h ; nSize .text:1001BE78 push offset Filename ; lpFilename .text:1001BE7D push 0 ; hModule .text:1001BE7F call ds:GetModuleFileNameW .text:1001BE85 call sub_1001D310 .text:1001BE8A push offset Filename .text:1001BE8F push offset aInfoCurrentWor ; "[Info]: Current working directory: '%ls"... .text:1001BE94 push 1000h .text:1001BE99 push offset Source .text:1001BE9E mov dword_1002B494, offset aDecodermain ; "DecoderMain" .text:1001BEA8 mov dword_1002B498, (offset aCUsersViktorDe_21+8Ah) ; "DllMain.cpp" .text:1001BEB2 mov dword_1002B490, 17Bh .text:1001BEBC call sub_100010A0 .text:1001BEC1 add esp, 10h .text:1001BEC4 test eax, eax .text:1001BEC6 jns short loc_1001BEF1 .text:1001BEC8 push dword_1002B490 .text:1001BECE push dword_1002B498 .text:1001BED4 push dword_1002B494 .text:1001BEDA push offset aErrorInvalidGi ; "[Error]: Invalid given format string an"... .text:1001BEDF push 1000h .text:1001BEE4 push offset Source .text:1001BEE9 call sub_100010A0 .text:1001BEEE add esp, 18h .text:1001BEF1 .text:1001BEF1 loc_1001BEF1: ; CODE XREF: sub_1001BE60+66↑j .text:1001BEF1 push 1000h ; MaxCount .text:1001BEF6 push offset Source ; Source .text:1001BEFB call _wcsnlen .text:1001BF00 add esp, 8 .text:1001BF03 mov edx, eax .text:1001BF05 mov ecx, offset Source .text:1001BF0A call sub_1001A760 .text:1001BF0F push 104h ; MaxCount .text:1001BF14 push offset Filename ; Source .text:1001BF19 call _wcsnlen .text:1001BF1E add esp, 8 .text:1001BF21 cmp eax, 104h .text:1001BF26 jnb short loc_1001BF33 .text:1001BF28 mov Filename[eax2], 2Ah ; '' .text:1001BF33 .text:1001BF33 loc_1001BF33: ; CODE XREF: sub_1001BE60+C6↑j .text:1001BF33 push 14A0h ; Size .text:1001BF38 lea eax, [esp+14B4h+var_14A0] .text:1001BF3C mov dword ptr [esp+14B4h+ArgList], 0 .text:1001BF44 push 0 ; Val .text:1001BF46 push eax ; void * .text:1001BF47 call _memset .text:1001BF4C add esp, 0Ch .text:1001BF4F lea eax, [esp+14B0h+ArgList] .text:1001BF53 lea ecx, [esp+14B0h+var_14A0] .text:1001BF57 push eax .text:1001BF58 call sub_1001D1F0 .text:1001BF5D test eax, eax .text:1001BF5F jz loc_1001BFF3 .text:1001BF65 push offset Filename .text:1001BF6A mov dword_1002B494, offset aDecodermain_0 ; "DecoderMain" .text:1001BF74 mov dword_1002B498, (offset aCUsersViktorDe_22+8Ah) ; "DllMain.cpp" .text:1001BF7E mov dword_1002B490, 190h .text:1001BF88 push offset aErrorSomething ; "[Error]: Something went wrong while try"... .text:1001BF8D .text:1001BF8D loc_1001BF8D: ; CODE XREF: sub_1001BE60+1C3↓j .text:1001BF8D push 1000h .text:1001BF92 push offset Source .text:1001BF97 call sub_100010A0 .text:1001BF9C add esp, 10h .text:1001BF9F test eax, eax .text:1001BFA1 jns short loc_1001BFCC .text:1001BFA3 push dword_1002B490 .text:1001BFA9 push dword_1002B498 .text:1001BFAF push dword_1002B494 .text:1001BFB5 push offset aErrorInvalidGi ; "[Error]: Invalid given format string an"... .text:1001BFBA push 1000h .text:1001BFBF push offset Source .text:1001BFC4 call sub_100010A0 .text:1001BFC9 add esp, 18h .text:1001BFCC .text:1001BFCC loc_1001BFCC: ; CODE XREF: sub_1001BE60+141↑j .text:1001BFCC push 1000h ; MaxCount .text:1001BFD1 push offset Source ; Source .text:1001BFD6 call _wcsnlen .text:1001BFDB add esp, 8 .text:1001BFDE mov edx, eax .text:1001BFE0 mov ecx, offset Source .text:1001BFE5 call sub_1001A760 .text:1001BFEA xor eax, eax .text:1001BFEC pop edi .text:1001BFED pop esi .text:1001BFEE pop ebx .text:1001BFEF mov esp, ebp .text:1001BFF1 pop ebp .text:1001BFF2 retn .text:1001BFF3 ; --------------------------------------------------------------------------- .text:1001BFF3 .text:1001BFF3 loc_1001BFF3: ; CODE XREF: sub_1001BE60+FF↑j .text:1001BFF3 mov edi, dword ptr [esp+14B0h+ArgList] .text:1001BFF7 test edi, edi .text:1001BFF9 jnz short loc_1001C028 .text:1001BFFB push offset Filename .text:1001C000 mov dword_1002B494, offset aDecodermain_1 ; "DecoderMain" .text:1001C00A mov dword_1002B498, (offset aCUsersViktorDe_23+8Ah) ; "DllMain.cpp" .text:1001C014 mov dword_1002B490, 196h .text:1001C01E push offset aErrorCouldNotF ; "[Error]: Could not find any GRF file in"... .text:1001C023 jmp loc_1001BF8D .text:1001C028 ; --------------------------------------------------------------------------- .text:1001C028 .text:1001C028 loc_1001C028: ; CODE XREF: sub_1001BE60+199↑j .text:1001C028 push edi .text:1001C029 push offset aInfoUGrfFilesF ; "[Info]: %u GRF files found:\n" .text:1001C02E push 1000h .text:1001C033 push offset Source .text:1001C038 mov dword_1002B494, offset aDecodermain_2 ; "DecoderMain" .text:1001C042 mov dword_1002B498, (offset aCUsersViktorDe_24+8Ah) ; "DllMain.cpp" .text:1001C04C mov dword_1002B490, 19Ah .text:1001C056 call sub_100010A0 .text:1001C05B add esp, 10h .text:1001C05E test eax, eax .text:1001C060 jns short loc_1001C08B .text:1001C062 push dword_1002B490 .text:1001C068 push dword_1002B498 .text:1001C06E push dword_1002B494 .text:1001C074 push offset aErrorInvalidGi_1 ; "[Error]: Invalid given format string an"... .text:1001C079 push 1000h .text:1001C07E push offset Source .text:1001C083 call sub_100010A0 .text:1001C088 add esp, 18h .text:1001C08B .text:1001C08B loc_1001C08B: ; CODE XREF: sub_1001BE60+200↑j .text:1001C08B push 1000h ; MaxCount .text:1001C090 push offset Source ; Source .text:1001C095 call _wcsnlen .text:1001C09A add esp, 8 .text:1001C09D mov edx, eax .text:1001C09F mov ecx, offset Source .text:1001C0A4 call sub_1001A760 .text:1001C0A9 xor ebx, ebx .text:1001C0AB test edi, edi .text:1001C0AD jz loc_1001C14E .text:1001C0B3 lea esi, [esp+14B0h+var_14A0] .text:1001C0B7 .text:1001C0B7 loc_1001C0B7: ; CODE XREF: sub_1001BE60+2E8↓j .text:1001C0B7 push esi .text:1001C0B8 push 0 .text:1001C0BA lea eax, [ebx+1] .text:1001C0BD mov dword_1002B494, offset aDecodermain_3 ; "DecoderMain" .text:1001C0C7 push eax .text:1001C0C8 push offset aInfoLluLs ; "[Info]: (%llu) %ls\n" .text:1001C0CD push 1000h .text:1001C0D2 push offset Source .text:1001C0D7 mov dword_1002B498, (offset aCUsersViktorDe_25+8Ah) ; "DllMain.cpp" .text:1001C0E1 mov ebx, eax .text:1001C0E3 mov dword_1002B490, 19Dh .text:1001C0ED call sub_100010A0 .text:1001C0F2 add esp, 18h .text:1001C0F5 test eax, eax .text:1001C0F7 jns short loc_1001C122 .text:1001C0F9 push dword_1002B490 .text:1001C0FF push dword_1002B498 .text:1001C105 push dword_1002B494 .text:1001C10B push offset aErrorInvalidGi_2 ; "[Error]: Invalid given format string an"... .text:1001C110 push 1000h .text:1001C115 push offset Source .text:1001C11A call sub_100010A0 .text:1001C11F add esp, 18h .text:1001C122 .text:1001C122 loc_1001C122: ; CODE XREF: sub_1001BE60+297↑j .text:1001C122 push 1000h ; MaxCount .text:1001C127 push offset Source ; Source .text:1001C12C call _wcsnlen .text:1001C131 add esp, 8 .text:1001C134 mov edx, eax .text:1001C136 mov ecx, offset Source .text:1001C13B call sub_1001A760 .text:1001C140 add esi, 210h .text:1001C146 cmp ebx, edi .text:1001C148 jb loc_1001C0B7 .text:1001C14E .text:1001C14E loc_1001C14E: ; CODE XREF: sub_1001BE60+24D↑j .text:1001C14E xor ecx, ecx .text:1001C150 test edi, edi .text:1001C152 jz short loc_1001C17C .text:1001C154 lea ebx, [esp+14B0h+var_14A0] .text:1001C158 nop dword ptr [eax+eax+00000000h] .text:1001C160 .text:1001C160 loc_1001C160: ; CODE XREF: sub_1001BE60+31A↓j .text:1001C160 mov esi, ecx .text:1001C162 mov ecx, ebx .text:1001C164 call sub_1001C220 .text:1001C169 test eax, eax .text:1001C16B lea ecx, [esi+1] .text:1001C16E cmovnz ecx, esi .text:1001C171 add ebx, 210h .text:1001C177 sub edi, 1 .text:1001C17A jnz short loc_1001C160 .text:1001C17C .text:1001C17C loc_1001C17C: ; CODE XREF: sub_1001BE60+2F2↑j .text:1001C17C push 0 .text:1001C17E push ecx .text:1001C17F push offset aInfoDoneExtrac ; "[Info]: Done extracting %llu GRFs.\n" .text:1001C184 push 1000h .text:1001C189 push offset Source .text:1001C18E mov dword_1002B494, offset aDecodermain_4 ; "DecoderMain" .text:1001C198 mov dword_1002B498, (offset aCUsersViktorDe_26+8Ah) ; "DllMain.cpp" .text:1001C1A2 mov dword_1002B490, 1ADh .text:1001C1AC call sub_100010A0 .text:1001C1B1 add esp, 14h .text:1001C1B4 test eax, eax .text:1001C1B6 jns short loc_1001C1E1 .text:1001C1B8 push dword_1002B490 .text:1001C1BE push dword_1002B498 .text:1001C1C4 push dword_1002B494 .text:1001C1CA push offset aErrorInvalidGi_3 ; "[Error]: Invalid given format string an"... .text:1001C1CF push 1000h .text:1001C1D4 push offset Source .text:1001C1D9 call sub_100010A0 .text:1001C1DE add esp, 18h .text:1001C1E1 .text:1001C1E1 loc_1001C1E1: ; CODE XREF: sub_1001BE60+356↑j .text:1001C1E1 push 1000h ; MaxCount .text:1001C1E6 push offset Source ; Source .text:1001C1EB call _wcsnlen .text:1001C1F0 add esp, 8 .text:1001C1F3 mov edx, eax .text:1001C1F5 mov ecx, offset Source .text:1001C1FA call sub_1001A760 .text:1001C1FF push offset aPause ; "pause" .text:1001C204 call sub_10008DE7 .text:1001C209 add esp, 4 .text:1001C20C mov eax, 1 .text:1001C211 pop edi .text:1001C212 pop esi .text:1001C213 pop ebx .text:1001C214 mov esp, ebp .text:1001C216 pop ebp .text:1001C217 retn .text:1001C217 sub_1001BE60 endp .text:1001C217
- Assistant