joyce8/EMBER2024-capa huggingface dataset:
Function at 0x2068f61
Capabilities:
Get system information on windows

Disassembly:
sub esp, 0x40
push ebx
xor ebx, ebx
cmp dword [0x206f484], 0x40
jae 0x206904e
mov ecx, dword [esp + 0x48]
push ebp
push esi
mov esi, dword [esp + 0x54]
mov ebp, 0xfff80000
add esi, ecx
add ecx, dword [esp + 0x5c]
push edi
cmp ecx, 0x80000000
lea edi, [esp + 0x2c]
push 9
lea eax, [ecx + 0x7ff80000]
cmovb ebp, eax
xor eax, eax
pop ecx
rep stosd dword es:[edi], eax
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
xor eax, eax
lea edi, [esi - 0x7fff0000]
inc eax
cmp esi, 0x80000000
cmovb edi, eax
cmp edi, ebp
jae 0x206904b
push 0x1c
lea eax, [esp + 0x14]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x2069026
cmp dword [esp + 0x20], 0x10000
jne 0x2069018
mov eax, dword [esp + 0x1c]
cmp eax, 0x6c
jb 0x206901c
mov ecx, dword [esp + 0x48]
cmp eax, ecx
jb 0x206901c
lea eax, [ecx - 1]
xor edx, edx
add eax, edi
div ecx
push 0x20
imul eax, ecx
push 0x3000
push 0x6c
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, eax
test ebx, ebx
jne 0x206902a
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x10]
add edi, eax
cmp edi, ebp
jb 0x2068fc9
test ebx, ebx
je 0x206904b
xor eax, eax
cmp dword [eax*4 + 0x206f488], 0
je 0x206903e
inc eax
cmp eax, 0x40
jb 0x206902c
jmp 0x206904b
inc dword [0x206f484]
mov dword [eax*4 + 0x206f488], ebx
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x40
ret
Function at 0x206aae0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov eax, dword [esp + 0xc]
sub esp, 0x10c
push ebx
push ebp
mov ebp, dword [esp + 0x11c]
push esi
push edi
lea ebx, [eax + ebp]
cmp eax, 8
jbe 0x206ac97
mov edi, dword [esp + 0x120]
lea esi, [ebp + 8]
push 0x800
lea eax, [edi + 0x5410]
push eax
mov eax, ebx
sub eax, esi
push eax
lea eax, [edi + 0x140c]
push esi
push eax
call fcn.0206e110
add esp, 0x14
cmp eax, 0xffffff88
ja 0x206ac97
add esi, eax
mov dword [esp + 0x14], 0x1c
mov eax, ebx
sub eax, esi
push eax
push esi
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x3c]
push eax
call fcn.0206ace0
add esp, 0x14
mov dword [esp + 0x10], eax
cmp eax, 0xffffff88
ja 0x206ac97
mov eax, dword [esp + 0x1c]
cmp eax, 8
ja 0x206ac97
push eax
push dword [esp + 0x18]
lea eax, [esp + 0x34]
push eax
lea eax, [edi + 0x804]
push eax
call fcn.0206b110
add esp, 0x10
cmp eax, 0xffffff88
ja 0x206ac97
add esi, dword [esp + 0x10]
mov eax, ebx
sub eax, esi
mov dword [esp + 0x18], 0x34
push eax
push esi
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0xc0]
push eax
call fcn.0206ace0
add esp, 0x14
mov dword [esp + 0x10], eax
cmp eax, 0xffffff88
ja 0x206ac97
mov eax, dword [esp + 0x20]
cmp eax, 9
ja 0x206ac97
push eax
push dword [esp + 0x1c]
lea eax, [esp + 0xb8]
push eax
lea eax, [edi + 0xc08]
push eax
call fcn.0206b110
add esp, 0x10
cmp eax, 0xffffff88
ja 0x206ac97
add esi, dword [esp + 0x10]
mov eax, ebx
sub eax, esi
mov dword [esp + 0x10], 0x23
push eax
push esi
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x78]
push eax
call fcn.0206ace0
add esp, 0x14
mov dword [esp + 0x28], eax
cmp eax, 0xffffff88
ja 0x206ac97
mov eax, dword [esp + 0x24]
cmp eax, 9
ja 0x206ac97
push eax
push dword [esp + 0x14]
lea eax, [esp + 0x70]
push eax
push edi
call fcn.0206b110
add esp, 0x10
cmp eax, 0xffffff88
ja 0x206ac97
add esi, dword [esp + 0x28]
lea eax, [esi + 0xc]
cmp eax, ebx
ja 0x206ac97
sub ebx, esi
xor edx, edx
sub ebx, 0xc
add edi, 0x5c10
nop
mov ecx, dword [esi]
add esi, 4
test ecx, ecx
je 0x206ac97
cmp ecx, ebx
jae 0x206ac97
mov dword [edi], ecx
inc edx
add edi, 4
cmp edx, 3
jl 0x206ac70
sub esi, ebp
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret
pop edi
pop esi
pop ebp
mov eax, 0xffffffe2
pop ebx
add esp, 0x10c
ret
Function at 0x206dd40
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx]
shr eax, 8
test al, al
je 0x206dd56
mov dword [esp + 0x14], ecx
jmp fcn.0206cf60
mov dword [esp + 0x14], ecx
jmp fcn.0206c320
Function at 0xcd7000
Capabilities:
Decompress data using aplib

Disassembly:
jmp 0xcd700a
jmp 0xcd900f
jmp fcn.00a40058
Function at 0x401130
Capabilities:
Create thread

Disassembly:
push 0xffffffffffffffff
push 0x40a90b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24
push esi
push edi
push 0x3c
call fcn.00401a90
add esp, 4
mov dword [esp + 8], eax
test eax, eax
mov dword [esp + 0x34], 0
je 0x401177
mov ecx, dword [esp + 0x3c]
push 0x4012a0
push ecx
mov ecx, eax
call fcn.00401000
jmp 0x401179
xor eax, eax
push 0
mov ecx, eax
mov dword [esp + 0x38], 0xffffffff
mov dword [0x40fd98], eax
call fcn.00401110
mov ecx, dword [0x40fd98]
call fcn.00401080
mov edi, dword [sym.imp.USER32.dll_MessageBoxA]
test eax, eax
jne 0x4011b4
push 0
push str.GoToHEAT
push str.Unexpected_error_1_.__Somethings_seriously_wrong_with__nthe_system.__Try_restarting_Windows.
push 0
call edi
mov ecx, dword [0x40fd98]
call fcn.004010a0
test eax, eax
jne 0x4011d1
push eax
push str.GoToHEAT
push str.Unexpected_error_2_.__Somethings_seriously_wrong_with__nthe_system.__Try_restarting_Windows.
push eax
call edi
mov edx, dword [0x40c06c]
mov ecx, dword [0x40fd98]
mov dword [esp + 0x18], edx
call fcn.00401100
mov esi, eax
push esi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x401229
lea eax, [esp + 0xc]
push eax
push 0
push esi
push 0x401330
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x401229
push eax
push str.GoToHEAT
push str.Unexpected_error_3_.__Somethings_seriously_wrong_with__nthe_system.__Try_restarting_Windows.
push esi
call edi
push 0
push 0
push 0x10
push esi
call dword [sym.imp.USER32.dll_PostMessageA]
mov esi, dword [sym.imp.USER32.dll_GetMessageA]
push 0
push 0
lea ecx, [esp + 0x18]
push 0
push ecx
call esi
test eax, eax
je 0x40126d
mov edi, dword [sym.imp.USER32.dll_DispatchMessageA]
cmp eax, 0xffffffff
jne 0x401255
mov edx, dword [0x40c06c]
mov dword [esp + 0x18], edx
lea eax, [esp + 0x10]
push eax
call edi
push 0
push 0
lea ecx, [esp + 0x18]
push 0
push ecx
call esi
test eax, eax
jne 0x401246
mov eax, dword [0x40fd98]
push eax
call fcn.00401a80
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x1c]
add esp, 4
mov dword fs:[0], ecx
pop edi
pop esi
add esp, 0x30
ret 0x10
Function at 0x401530
Capabilities:
Get disk information
Hide graphical window

Disassembly:
sub esp, 0x28
mov eax, dword [0x40c320]
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
push 0
push 0
push 0
push 0x6a
push 0
mov esi, eax
mov dword [esp + 0x28], 0x40c31c
mov dword [esp + 0x2c], 0
call dword [sym.imp.USER32.dll_CreateDialogParamA]
test esi, esi
mov ebp, eax
mov byte [esp + 0x10], 0x41
je 0x4015a8
mov ebx, dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
lea ecx, [esp + 0x10]
push ecx
call ebx
cmp eax, 5
jne 0x401598
mov edx, dword [esp + 0x10]
push edx
call fcn.00401620
mov edi, eax
add esp, 4
test edi, edi
jne 0x4015be
mov cl, byte [esp + 0x10]
shr esi, 1
inc cl
test esi, esi
mov byte [esp + 0x10], cl
jne 0x401579
push 0
push ebp
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
push 0
push ebp
call dword [sym.imp.USER32.dll_ShowWindow]
lea eax, [esp + 0x14]
push eax
push edi
push 1
call fcn.0040a130
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebp, dword [sym.imp.USER32.dll_PeekMessageA]
add esp, 0xc
mov esi, eax
push 1
push esi
call ebx
test eax, eax
je 0x4015ff
push 1
push 0
push 0
lea ecx, [esp + 0x28]
push 0
push ecx
call ebp
jmp 0x4015e5
push edi
call fcn.00401a80
add esp, 4
call fcn.004014a0
neg eax
sbb eax, eax
pop edi
and al, 0xfc
pop esi
pop ebp
add eax, 4
pop ebx
add esp, 0x28
ret
Function at 0x401660
Capabilities:
Create process on windows
Get common file path

Disassembly:
mov eax, 0x1514
call fcn.00402620
push esi
push edi
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x11d]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x18]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push 0
call fcn.00402410
mov edx, eax
add esp, 4
test edx, edx
je 0x4017d6
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + ecx + 0x17]
mov cl, byte [esp + ecx + 0x17]
cmp cl, 0x5c
jne 0x4016c1
mov byte [eax], 0
push 0xe
lea ecx, [esp + 0xc]
push edx
push ecx
call fcn.00402310
add esp, 0xc
lea edx, [esp + 8]
lea eax, [esp + 0x18]
lea ecx, [esp + 0x11c]
push edx
push eax
push str._s_surl
push ecx
mov byte [esp + 0x25], 0
call fcn.00401ef0
add esp, 0x10
lea edx, [esp + 0x11c]
push 0x40c414
push edx
call fcn.004022f0
mov esi, eax
add esp, 8
test esi, esi
jne 0x401727
push eax
push str.GoToHEAT
push str.Couldnt_open_a_temporary_file.__Make_sure_that_there_is_some__nfree_disk_space_on_your_hard_drive.
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x4017c6
mov ecx, dword [esp + 0x1520]
lea edx, [esp + 0x51c]
push ecx
push str._InternetShortcut__nURL_s
push edx
call fcn.00401ef0
add esp, 0xc
lea eax, [esp + 0x51c]
push eax
push 0x40c390
push esi
call fcn.00402260
add esp, 0xc
test eax, eax
jge 0x401794
push 0
push str.GoToHEAT
push str.Unexpected_error_4_.__Somethings_seriously_wrong_with__nthe_system.__Try_restarting_Windows.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
call fcn.004021b0
add esp, 4
lea ecx, [esp + 0x11c]
push ecx
call fcn.00402180
add esp, 4
pop edi
pop esi
add esp, 0x1514
ret
push esi
call fcn.004021b0
add esp, 4
lea edx, [esp + 0x11c]
push 0
push 0x4101a0
push 0
push edx
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
push 0xafc8
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [esp + 0x11c]
push eax
call fcn.00402180
add esp, 4
pop edi
pop esi
add esp, 0x1514
ret
Function at 0x4017e0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x80c
mov al, byte [0x4101a0]
push ebx
push esi
push edi
mov byte [esp + 0x18], al
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x19]
rep stosd dword es:[edi], eax
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea ecx, [esp + 0xc]
push ecx
push 0x20019
stosw word es:[edi], ax
push 0
push str.SoftwareClasses.spi
push 0x80000002
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0x400
stosb byte es:[edi], al
call esi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea edx, [esp + 0x10]
lea eax, [esp + 0x418]
push edx
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x18]
push eax
push ecx
push 0
push 0x4101a0
push edx
call edi
mov eax, dword [esp + 0xc]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push eax
call ebx
lea ecx, [esp + 0x418]
lea edx, [esp + 0x18]
push ecx
push str.SoftwareClasses_sShellOpencommand
push edx
call fcn.00401ef0
add esp, 0xc
lea eax, [esp + 0xc]
lea ecx, [esp + 0x18]
mov dword [esp + 0x10], 0x400
push eax
push 0x20019
push 0
push ecx
push 0x80000002
call esi
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x18]
push 0x40f998
push eax
push 0
push 0x4101a0
push ecx
call edi
mov edx, dword [esp + 0xc]
push edx
call ebx
pop edi
pop esi
mov eax, 0x40f998
pop ebx
add esp, 0x80c
ret
Function at 0x4018d0
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
sub esp, 0x350
push ebx
push ebp
mov ebp, dword [esp + 0x35c]
push esi
push edi
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
xor ebx, ebx
mov dl, byte [0x4101a0]
repne scasb al, byte es:[edi]
mov edi, dword [esp + 0x368]
mov byte [esp + 0x158], dl
not ecx
dec ecx
mov byte [esp + 0x25c], dl
mov esi, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x159]
mov dword [esp + 0x10], ecx
mov ecx, 0x40
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x25d]
mov dword [esp + 0x14], esi
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x10]
lea ecx, [eax + esi + 1]
push ecx
call fcn.00401a90
mov edx, dword [esp + 0x36c]
add esp, 4
mov esi, eax
push edx
push ebp
push str._s_s
push esi
call fcn.00401ef0
add esp, 0x10
lea eax, [esp + 0x18]
push eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_FindFirstFileA]
call esi
cmp eax, 0xffffffff
jne 0x401a3b
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push ebp
lea ecx, [esp + 0x15c]
push str._s.
push ecx
call fcn.00401ef0
add esp, 0xc
lea edx, [esp + 0x18]
lea eax, [esp + 0x158]
push edx
push eax
call esi
mov dword [esp + 0x10], eax
mov ecx, 1
mov edi, 0x40c46c
lea esi, [esp + 0x44]
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x401a19
mov ecx, 8
mov edi, str.Recycled
lea esi, [esp + 0x44]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x401a19
test byte [esp + 0x18], 0x10
je 0x401a19
lea ecx, [esp + 0x44]
lea edx, [esp + 0x25c]
push ecx
push ebp
push str._s_s
push edx
call fcn.00401ef0
mov eax, dword [esp + 0x378]
add esp, 0x10
lea ecx, [esp + 0x25c]
push eax
push ecx
call fcn.004018d0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x401a2e
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x18]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
cmp eax, 1
je 0x4019b1
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x350
ret
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
lea eax, [ecx + edx + 2]
push eax
call fcn.00401a90
add esp, 4
lea ecx, [esp + 0x44]
mov esi, eax
push ecx
push ebp
push str._s_s
push esi
call fcn.00401ef0
add esp, 0x10
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x350
ret
Function at 0x402080
Capabilities:
Terminate process

Disassembly:
push ebx
push ebp
push esi
call fcn.00402140
mov eax, dword [0x4105e8]
mov ebp, dword [esp + 0x10]
cmp eax, 1
jne 0x4020a4
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x4105e4], 1
mov byte [0x4105e0], bl
jne 0x4020fe
mov ecx, dword [0x411bac]
test ecx, ecx
je 0x4020ec
mov esi, dword [0x411ba8]
sub esi, 4
cmp esi, ecx
jb 0x4020ec
mov eax, dword [esi]
test eax, eax
je 0x4020e5
call eax
mov ecx, dword [0x411bac]
sub esi, 4
cmp esi, ecx
jae 0x4020d7
push 0x40c024
push 0x40c018
call fcn.00402160
add esp, 8
push 0x40c030
push 0x40c028
call fcn.00402160
add esp, 8
test ebx, ebx
je 0x40211d
call fcn.00402150
pop esi
pop ebp
pop ebx
ret
push ebp
mov dword [0x4105e8], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x402180
Capabilities:
Delete file

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x402197
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x402199
xor eax, eax
test eax, eax
je 0x4021aa
push eax
call fcn.00404490
add esp, 4
or eax, 0xffffffff
ret
xor eax, eax
ret
Function at 0x402650
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40b018
push 0x4060e8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffa8
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
mov dl, ah
mov dword [0x4105b8], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x4105b4], ecx
shl ecx, 8
add ecx, edx
mov dword [0x4105b0], ecx
shr eax, 0x10
mov dword [0x4105ac], eax
call fcn.004060a0
test eax, eax
jne 0x4026ba
push 0x1c
call fcn.00402800
add esp, 4
call fcn.004033f0
test eax, eax
jne 0x4026cd
push 0x10
call fcn.00402800
add esp, 4
mov dword [ebp - 4], 0
call fcn.00405e90
call fcn.00405e80
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x411ba4], eax
call fcn.00405a20
mov dword [0x410610], eax
test eax, eax
je 0x402700
mov eax, dword [0x411ba4]
test eax, eax
jne 0x40270a
push 0xffffffffffffffff
call fcn.00402040
add esp, 4
call fcn.00405770
call fcn.00405680
call fcn.00402010
mov esi, dword [0x411ba4]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x4027e9
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x402751
test al, al
je 0x402751
and eax, 0xff
push eax
call fcn.00405620
add esp, 4
test eax, eax
je 0x40272b
inc esi
mov dword [ebp - 0x64], esi
jmp 0x40272b
cmp byte [esi], 0x22
jne 0x40275a
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x40276a
cmp al, 0x20
ja 0x40276a
inc esi
mov dword [ebp - 0x64], esi
jmp 0x40275a
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x40278b
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x402790
mov eax, 0xa
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x60], eax
push eax
call fcn.00402040
jmp 0x4027ce
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x20
jbe 0x40275a
inc esi
mov dword [ebp - 0x64], esi
jmp 0x4027e9

Function at 0x4033f0
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push esi
call fcn.004042e0
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x40c4a0], eax
je 0x403448
push 0x74
push 1
call fcn.00406f50
mov esi, eax
add esp, 8
test esi, esi
je 0x403448
mov eax, dword [0x40c4a0]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x403448
push esi
call fcn.00403450
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
mov eax, 1
pop esi
ret
xor eax, eax
pop esi
ret
Function at 0x403470
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x40c4a0]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x4034de
push 0x74
push 1
call fcn.00406f50
mov esi, eax
add esp, 8
test esi, esi
je 0x4034d4
mov ecx, dword [0x40c4a0]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x4034d4
push esi
call fcn.00403450
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push edi
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
push 0x10
call fcn.00402800
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret

Function at 0x404b80
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x404ba3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00404490
add esp, 4
or eax, 0xffffffff
ret
test al, 1
je 0x404bc8
test byte [esp + 8], 2
je 0x404bc8
call fcn.00404510
mov dword [eax], 0xd
call fcn.00404520
mov dword [eax], 5
or eax, 0xffffffff
ret
xor eax, eax
ret
Function at 0x405a20
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x410798]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x405a62
call edi
mov esi, eax
test esi, esi
je 0x405a4c
mov eax, 1
jmp 0x405a5d
call ebp
mov ebx, eax
test ebx, ebx
je 0x405b6f
mov eax, 2
mov dword [0x410798], eax
cmp eax, 1
jne 0x405b02
test esi, esi
jne 0x405a7b
call edi
mov esi, eax
test esi, esi
je 0x405b6f
cmp word [esi], 0
mov eax, esi
je 0x405a95
add eax, 2
cmp word [eax], 0
jne 0x405a83
add eax, 2
cmp word [eax], 0
jne 0x405a83
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x405af4
push edi
call fcn.004028a0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x405af4
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x405ae6
push ebx
call fcn.00402830
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x405b6f
test ebx, ebx
jne 0x405b13
call ebp
mov ebx, eax
test ebx, ebx
je 0x405b6f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x405b2b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x405b1b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x405b1b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.004028a0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x405b4d
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x406200
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x40caa8
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x406224
add eax, 8
inc ebp
cmp eax, 0x40cb38
jb 0x406215
cmp ecx, dword [ebp*8 + 0x40caa8]
jne 0x4063cb
mov eax, dword [0x410618]
cmp eax, 1
je 0x40638d
test eax, eax
jne 0x406250
cmp dword [0x40c494], 1
je 0x40638d
cmp ecx, 0xfc
je 0x4063cb
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40628b
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x4062d4
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x40b3e8
add ebx, ecx
push ebx
call fcn.00402310
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40b3c8
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x40caac]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00408350
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x411aa0]
test eax, eax
je 0x40639e
mov esi, dword [eax + 0x48]
cmp esi, 0xffffffff
jne 0x4063a8
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x40caac]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret