joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1002cb70
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [0x10063128]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov esi, dword [eax + 0x5e8]
mov edi, dword [eax]
lea ebx, [esi + 0x15c]
mov dword [ebp - 0x8c], eax
lea eax, [ebp - 0x88]
push eax
mov dword [ebp - 0x88], 0x80
lea eax, [ebp - 0x84]
push eax
mov eax, dword [esi + 0x154]
push 0
add eax, 4
push eax
push dword [ebx]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [esi + 0x148], 0
mov dword [esi + 0x14c], eax
jne 0x1002cc03
push dword [ebp - 0x88]
lea eax, [ebp - 0x84]
push eax
lea eax, [esi + 0xc8]
push eax
call fcn.1003d720
mov eax, dword [ebp - 0x88]
add esp, 0xc
mov dword [esi + 0x148], eax
mov edx, dword [esi + 0x14c]
cmp edx, 4
jge 0x1002cc36
push str.Received_too_short_packet
push edi
call fcn.100240b0
add esp, 8
mov dword [esi + 0xc], 7
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1003ce33
mov esp, ebp
pop ebp
ret
push ebx
call fcn.1002c770
movzx eax, ax
add esp, 4
mov dword [esi + 0xc], eax
add eax, 0xfffffffd
cmp eax, 3
ja case.default.0x1002cc51
jmp dword [eax*4 + 0x1002cd68]
cmp edx, 4
jle case.0x1002cc51.4
push ebx
call fcn.1002c750
movzx ecx, word [esi + 0x40]
add esp, 4
inc ecx
cmp cx, ax
jne case.0x1002cc51.4
lea eax, [edx - 4]
push eax
mov eax, dword [ebx]
add eax, 4
push eax
push 1
push dword [ebp - 0x8c]
call fcn.10023f70
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x1002ccb6
push 5
push esi
call fcn.1002d480
add esp, 8
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1003ce33
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x14c]
sub eax, 4
cdq
add dword [edi + 0x70], eax
adc dword [edi + 0x74], edx
push dword [edi + 0x74]
push dword [edi + 0x70]
push edi
call fcn.100218f0
jmp 0x1002cd2e
push ebx
call fcn.1002c750
movzx eax, ax
mov dword [esi + 8], eax
mov eax, dword [ebx]
add eax, 4
push eax
push 0x100529f8
push edi
call fcn.10024160
add esp, 0x10
jmp case.0x1002cc51.4
lea eax, [edx - 2]
push eax
mov eax, dword [ebx]
add eax, 2
push eax
push esi
call fcn.1002c920
add esp, 0xc
test eax, eax
je case.0x1002cc51.4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1003ce33
mov esp, ebp
pop ebp
ret
push str.Internal_error:_Unexpected_packet
push 0x1005344c
push edi
call fcn.100240b0
add esp, 0xc
push dword [ebp - 0x8c]
call fcn.10021c60
add esp, 4
test eax, eax
je 0x1002cc23
push 5
push esi
call fcn.1002d480
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
mov eax, 0x2a
pop edi
pop esi
pop ebx
call fcn.1003ce33
mov esp, ebp
pop ebp
ret
Function at 0x1002cd80
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x10]
mov ebx, dword [eax]
mov eax, dword [ebp + 0xc]
add eax, 0xfffffffd
cmp eax, 4
ja case.0x1002cd9d.4
jmp dword [eax*4 + 0x1002cfb8]
lea eax, [edi + 0x15c]
push eax
call fcn.1002c750
movzx ecx, word [edi + 0x40]
add esp, 4
movzx esi, ax
lea eax, [ecx + 1]
and eax, 0xffff
cmp eax, esi
jne 0x1002cdcf
mov dword [edi + 0x18], 0
jmp 0x1002cde6
cmp ecx, esi
jne 0x1002ce5a
push esi
push str.Received_last_DATA_packet_block__d_again._n
push ebx
call fcn.10024160
add esp, 0xc
mov word [edi + 0x40], si
lea esi, [edi + 0x160]
push 4
push esi
call fcn.1002c7b0
movzx eax, word [edi + 0x40]
push eax
push esi
call fcn.1002c790
add esp, 0x10
lea eax, [edi + 0xc8]
push dword [edi + 0x148]
push eax
push 0
push 4
push dword [esi]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
js 0x1002cf2e
mov eax, dword [edi + 0x154]
xor ecx, ecx
add eax, 4
cmp dword [edi + 0x14c], eax
lea eax, [edi + 0x38]
push eax
setl cl
lea ecx, [ecx*2 + 1]
mov dword [edi], ecx
call fcn.1003e370
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret
push eax
push esi
push str.Received_unexpected_DATA_packet_block__d__expecting_block__d_n
push ebx
call fcn.10024160
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret
xor eax, eax
lea esi, [edi + 0x160]
push 4
push esi
mov word [edi + 0x40], ax
mov dword [edi + 0x18], eax
call fcn.1002c7b0
movzx eax, word [edi + 0x40]
push eax
push esi
call fcn.1002c790
add esp, 0x10
lea eax, [edi + 0xc8]
push dword [edi + 0x148]
push eax
push 0
push 4
push dword [esi]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
js 0x1002cf2e
lea eax, [edi + 0x38]
mov dword [edi], 1
push eax
call fcn.1003e370
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret
movzx eax, word [edi + 0x40]
inc dword [edi + 0x18]
inc eax
push dword [edi + 0x18]
and eax, 0xffff
push eax
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
push ebx
call fcn.10024160
mov eax, dword [edi + 0x18]
add esp, 0x10
cmp eax, dword [edi + 0x20]
jle 0x1002cf0a
mov dword [edi + 8], 0xffffff9d
xor eax, eax
mov dword [edi], 3
pop edi
pop esi
pop ebx
pop ebp
ret
push dword [edi + 0x148]
lea eax, [edi + 0xc8]
push eax
push 0
push 4
push dword [edi + 0x160]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x1002cf94
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push dword [edi + 0x10]
call fcn.10029be0
push eax
push 0x1005344c
push ebx
call fcn.100240b0
add esp, 0x14
mov eax, 0x37
pop edi
pop esi
pop ebx
pop ebp
ret
lea esi, [edi + 0x160]
push 5
push esi
call fcn.1002c7b0
movzx eax, word [edi + 0x40]
push eax
push esi
call fcn.1002c790
add esp, 0x10
lea eax, [edi + 0xc8]
push dword [edi + 0x148]
push eax
push 0
push 4
push dword [esi]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
mov dword [edi], 3
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret
push str.tftp_rx:_internal_error
push 0x1005344c
push ebx
call fcn.100240b0
add esp, 0xc
mov eax, 0x47
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x1002d480
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x10]
mov edx, dword [ecx]
mov eax, dword [eax]
cmp edx, 3
ja case.default.0x1002d492
jmp dword [edx*4 + 0x1002d4e8]
mov dword [ebp + 8], ecx
pop ebp
jmp fcn.1002cfd0
mov dword [ebp + 8], ecx
pop ebp
jmp fcn.1002cd80
mov dword [ebp + 8], ecx
pop ebp
jmp fcn.1002d690
push str.TFTP_finished
push 0x100529f8
push eax
call fcn.10024160
add esp, 0xc
xor eax, eax
pop ebp
ret
push str.Internal_state_machine_error
push 0x1005344c
push eax
call fcn.100240b0
add esp, 0xc
mov eax, 0x47
pop ebp
ret
Function at 0x10036d00
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0x10]
call fcn.10036d50
add esp, 4
mov dword [ebp + 0x10], eax
pop ebp
jmp fcn.10048306

Function at 0x1003a2b0
Capabilities:
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
push ecx
push 0xf0000040
push 1
push 0
push 0
lea eax, [ebp - 4]
mov dword [ebp - 4], 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x1003a2f2
push dword [ebp + 8]
push dword [ebp + 0xc]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
push 0
push dword [ebp - 4]
test eax, eax
jne 0x1003a2fb
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, 2
mov esp, ebp
pop ebp
ret
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x403970
Capabilities:
Create directory
Get common file path
Set environment variable

Disassembly:
mov eax, 0x302c
call fcn.00407540
mov eax, dword [0x42d008]
xor eax, esp
mov dword [esp + 0x3028], eax
mov eax, dword [esp + 0x3030]
push ebx
push ebp
mov ebp, dword [esp + 0x303c]
mov dword [esp + 8], eax
push esi
push edi
test ebp, ebp
je 0x4039f6
push 0x42252c
call fcn.00403b60
push ebp
mov ebx, eax
lea eax, [esp + 0x3c]
push 0x1000
push eax
call fcn.00402710
push 0
push 0x42252c
push 0
call fcn.00404980
mov edi, eax
lea eax, [esp + 0x50]
push 0
push eax
push 0
call fcn.00404980
mov esi, eax
push esi
push edi
call fcn.0040e905
push edi
call fcn.004096f6
push esi
call fcn.004096f6
add esp, 0x38
jmp 0x4039fa
mov ebx, dword [esp + 0x10]
lea eax, [esp + 0x1038]
push eax
push 0x1000
call dword [sym.imp.KERNEL32.DLL_GetTempPathW]
call sub.KERNEL32.DLL_GetCurrentProcessId
push eax
push 0x422530
lea eax, [esp + 0x1c]
push 0x10
push eax
call fcn.00404430
add esp, 0x10
xor esi, esi
nop dword [eax]
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x103c]
push eax
call fcn.0040fa7b
mov edi, eax
push edi
call fcn.0040e941
add esp, 0xc
test eax, eax
je 0x403ac2
push edi
call fcn.004096f6
inc esi
add esp, 4
cmp esi, 5
jl 0x403a30
test ebp, ebp
je 0x403abe
push 0
push 0x42252c
push 0
call fcn.00404980
test ebx, ebx
je 0x403aa7
push 0
push ebx
push 0
mov edi, eax
call fcn.00404980
mov esi, eax
push esi
push edi
call fcn.0040e905
push edi
call fcn.004096f6
push esi
call fcn.004096f6
push ebx
call fcn.004096f6
add esp, 0x2c
xor eax, eax
jmp 0x403b38
add esp, 0xc
mov esi, eax
push 0
push esi
call dword [sym.imp.KERNEL32.DLL_SetEnvironmentVariableW]
push esi
call fcn.004096f6
add esp, 4
xor eax, eax
jmp 0x403b38
push 0x1000
push edi
push dword [esp + 0x18]
call fcn.00404a10
push edi
call fcn.004096f6
add esp, 0x10
test ebp, ebp
je 0x403b33
push 0
push 0x42252c
push 0
call fcn.00404980
test ebx, ebx
je 0x403b1c
push 0
push ebx
push 0
mov edi, eax
call fcn.00404980
mov esi, eax
push esi
push edi
call fcn.0040e905
push edi
call fcn.004096f6
push esi
call fcn.004096f6
push ebx
call fcn.004096f6
add esp, 0x2c
jmp 0x403b33
add esp, 0xc
mov esi, eax
push 0
push esi
call dword [sym.imp.KERNEL32.DLL_SetEnvironmentVariableW]
push esi
call fcn.004096f6
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x3038]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00407520
add esp, 0x302c
ret
Function at 0x403b60
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x4004
call fcn.00407540
mov eax, dword [0x42d008]
xor eax, esp
mov dword [esp + 0x4000], eax
mov eax, dword [esp + 0x4008]
push 0
push eax
push 0
call fcn.00404980
add esp, 0xc
lea ecx, [esp]
push 0x2000
push ecx
push eax
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableW]
test eax, eax
je 0x403bf0
push 0x2000
lea eax, [esp + 0x2004]
push eax
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsW]
push 0
lea eax, [esp + 4]
push eax
push 0
call fcn.00404a10
add esp, 0xc
test eax, eax
je 0x403bf0
cmp byte [eax], 0
je 0x403bf0
push eax
call fcn.0040dff4
add esp, 4
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.00407520
add esp, 0x4004
ret
mov ecx, dword [esp + 0x4000]
xor eax, eax
xor ecx, esp
call fcn.00407520
add esp, 0x4004
ret
Function at 0x403c10
Capabilities:
Create directory

Disassembly:
mov eax, 0x4034
call fcn.00407540
mov eax, dword [0x42d008]
xor eax, esp
mov dword [esp + 0x4030], eax
mov eax, dword [esp + 0x4038]
push esi
mov esi, dword [esp + 0x4040]
push 0x1000
push eax
lea eax, [esp + 0x3c]
push eax
call fcn.0040d1c0
push 0x1000
lea eax, [esp + 0x1044]
push esi
push eax
call fcn.0040d1c0
add esp, 0x18
cmp byte [esp + 0x1033], 0
jne 0x403dda
cmp byte [esp + 0x2033], 0
jne 0x403dda
push ebp
lea ebp, [esp + 0x38]
lea ecx, [ebp + 1]
mov al, byte [ebp]
inc ebp
test al, al
jne 0x403c81
push ebx
push edi
lea eax, [esp + 0x1040]
sub ebp, ecx
push 0x421404
push eax
call fcn.0040d2e4
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x403d84
nop dword [eax]
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403cb5
sub ecx, edx
inc ebp
add ebp, ecx
cmp ebp, 0xfff
jae 0x403d69
lea edi, [esp + 0x40]
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x403cd2
mov ax, word [0x421404]
mov esi, ebx
mov word [edi], ax
mov al, byte [ebx]
inc ebx
test al, al
jne 0x403ce7
lea edi, [esp + 0x40]
sub ebx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403cf5
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
push 0x421404
rep movsb byte es:[edi], byte [esi]
push 0
call fcn.0040d2e4
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x403d84
push 0x1000
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x2048]
push eax
call fcn.00404980
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x2050]
push eax
call fcn.0040db4d
add esp, 0x14
test eax, eax
jns 0x403cb0
lea eax, [esp + 0x2040]
push eax
call fcn.0040e941
add esp, 4
jmp 0x403cb0
xor eax, eax
pop edi
pop ebx
pop ebp
pop esi
mov ecx, dword [esp + 0x4030]
xor ecx, esp
call fcn.00407520
add esp, 0x4034
ret
push 0x1000
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x2048]
push eax
call fcn.00404980
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x2050]
push eax
call fcn.0040db4d
add esp, 0x14
test eax, eax
jne 0x403dc6
lea eax, [esp + 0x40]
push eax
push str.WARNING:_file_already_exists_but_should_not:__s_n
call fcn.00401860
add esp, 8
lea eax, [esp + 0x40]
push 0x4225d0
push eax
call fcn.004026a0
add esp, 8
jmp 0x403d6b
mov ecx, dword [esp + 0x4034]
xor eax, eax
pop esi
xor ecx, esp
call fcn.00407520
add esp, 0x4034
ret

Function at 0x4040f0
Capabilities:
Set environment variable

Disassembly:
push esi
push edi
push 0
push dword [esp + 0x10]
push 0
call fcn.00404980
add esp, 0xc
mov edi, eax
push 0
push edi
call dword [sym.imp.KERNEL32.DLL_SetEnvironmentVariableW]
push edi
mov esi, eax
call fcn.004096f6
add esp, 4
mov eax, esi
pop edi
pop esi
ret
Function at 0x404120
Capabilities:
Accept command line arguments
Create process on windows
Create process suspended

Disassembly:
mov eax, 0x2068
call fcn.00407540
mov eax, dword [0x42d008]
xor eax, esp
mov dword [esp + 0x2064], eax
mov eax, dword [esp + 0x206c]
push 0x1000
push eax
lea eax, [esp + 0x6c]
mov dword [esp + 8], 0
push eax
call fcn.00404980
push 1
push 0x16
call fcn.0040f510
push 1
push 2
call fcn.0040f510
push 1
push 0xf
call fcn.0040f510
push 1
push 0x15
call fcn.0040f510
add esp, 0x2c
mov dword [esp + 4], 0xc
lea eax, [esp + 0x20]
mov dword [esp + 8], 0
mov dword [esp + 0xc], 1
push eax
call dword [sym.imp.KERNEL32.DLL_GetStartupInfoW]
mov eax, 1
mov dword [esp + 0x24], 0
push 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x50], 0x101
mov word [esp + 0x54], ax
call fcn.0040a65d
push eax
call fcn.0040e61c
push eax
call fcn.0040f059
push 1
mov dword [esp + 0x68], eax
call fcn.0040a65d
push eax
call fcn.0040e61c
push eax
call fcn.0040f059
push 2
mov dword [esp + 0x78], eax
call fcn.0040a65d
push eax
call fcn.0040e61c
push eax
call fcn.0040f059
add esp, 0x24
mov dword [esp + 0x60], eax
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x24]
push eax
push 0
push 0
push 0
push 1
push 0
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.DLL_GetCommandLineW]
push eax
lea eax, [esp + 0x88]
push eax
call dword [sym.imp.KERNEL32.DLL_CreateProcessW]
test eax, eax
je 0x404277
push 0xffffffffffffffff
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
lea eax, [esp]
push eax
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.DLL_GetExitCodeProcess]
mov eax, dword [esp]
mov ecx, dword [esp + 0x2064]
xor ecx, esp
call fcn.00407520
add esp, 0x2068
ret
push str.Error_creating_child_process__n
push 0x4225f4
call fcn.00401890
mov ecx, dword [esp + 0x206c]
add esp, 8
xor ecx, esp
or eax, 0xffffffff
call fcn.00407520
add esp, 0x2068
ret
Function at 0x40183a
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x408
mov eax, dword [0x406008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x408], ecx
mov ebx, edx
mov esi, edi
push 8
mov edx, esi
pop edi
mov ecx, edx
mov eax, edx
shr ecx, 1
mov edx, ecx
xor edx, 0xedb88320
and al, 1
cmove edx, ecx
sub edi, 1
jne 0x401861
mov dword [ebp + esi*4 - 0x404], edx
inc esi
cmp esi, 0x100
jl 0x40185c
or edx, 0xffffffff
test ebx, ebx
je 0x4018ae
mov esi, dword [ebp - 0x408]
movzx ecx, byte [edi + esi]
movzx eax, dl
xor ecx, eax
shr edx, 8
xor edx, dword [ebp + ecx*4 - 0x404]
inc edi
cmp edi, ebx
jb 0x401896
mov ecx, dword [ebp - 4]
not edx
pop edi
pop esi
xor ecx, ebp
mov eax, edx
pop ebx
call fcn.00402d98
leave
ret

Function at 0x4019d7
Capabilities:
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x406008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
mov esi, ebx
mov eax, str.BinAppLaunch.prf
cmp dword [edi + 0x468], ebx
jne 0x401a17
push dword [edi + 0x480]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [edi + 0x480]
jmp 0x401b1c
cmp dword [edi + 4], ebx
je 0x401a31
push eax
lea eax, [edi + 0x152]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
push ebx
push 0x80
push 3
push ebx
push 3
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x401a5a
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x401aed
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x214], eax
cmp eax, 0xffffffff
je 0x401a4f
xor ecx, ecx
push ecx
push eax
push ecx
push 2
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov esi, eax
mov dword [ebp - 0x210], esi
test esi, esi
je 0x401a4f
mov ecx, dword [ebp - 0x214]
push ecx
push 0
push 0
push 4
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edx, dword [ebp - 0x214]
mov esi, eax
mov ecx, eax
mov dword [edi + 0x470], esi
lea edx, [edx - 4]
call fcn.0040183a
mov ecx, dword [ebp - 0x214]
cmp eax, dword [esi + ecx - 4]
je 0x401acb
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x401ae7
mov ecx, edi
call fcn.00402139
test eax, eax
je 0x401ae1
mov ecx, edi
call fcn.00401b2d
test eax, eax
jne 0x401ae7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebp - 0x210]
mov eax, dword [edi + 0x470]
test eax, eax
je 0x401b05
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
and dword [edi + 0x470], 0
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x401b12
push esi
call edi
cmp ebx, 0xffffffff
je 0x401b1a
push ebx
call edi
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00402d98
leave
ret 4
Function at 0x401bf7
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
xor ebx, ebx
mov esi, ecx
push ebx
push 0x50000080
push 3
push ebx
push 3
push 0x80000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x401cf1
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, dword [esi + 0x478]
jbe 0x401c6b
mov eax, dword [esi + 0x47c]
test eax, eax
je 0x401c50
push eax
push 1
push dword [esi + 0x468]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push ebx
push 1
push dword [esi + 0x468]
mov dword [esi + 0x478], ebx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esi + 0x47c], eax
push 0x14
push 9
push dword [esi + 0x468]
mov dword [esi + 0x460], 1
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 0x40226a
push eax
push ebx
and dword [eax + 8], 0
inc dword [esi]
mov dword [eax + 0x10], esi
push dword [esi + 0x47c]
push edi
call dword [sym.imp.KERNEL32.dll_ReadFileEx]
test eax, eax
jne 0x401cb9
sub dword [esi], 1
jne 0x401cb3
push ecx
mov ecx, esi
call fcn.004022ac
dec dword [esi + 0x460]
mov eax, dword [esi + 0x460]
test eax, eax
jle 0x401cea
push 1
push 0x1388
push dword [esi + 0x464]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
test eax, eax
je 0x401cea
cmp eax, 0x102
je 0x401cea
cmp dword [esi + 0x460], 0
jg 0x401cc3
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x401cf8
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
xor edi, edi
mov ebx, eax
mov dword [ebp - 8], edi
cmp dword [esi + 4], edi
je 0x401d22
lea edx, [esi + 0x35a]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 1
push edi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x401dca
mov edx, dword [esi + 0x478]
imul ecx, edx, 0x64
push ecx
lea ecx, [edx + edx]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_SetProcessWorkingSetSize]
test eax, eax
je 0x401dc1
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x10c], edi
jbe 0x401dc1
lea ebx, [ecx + 0x120]
mov eax, dword [ebx - 4]
mov dword [ebp - 4], eax
cmp eax, dword [ebx]
ja 0x401db2
mov edi, dword [ebp - 0xc]
add ecx, 0x29c
imul eax, eax, 0xc
add ecx, eax
mov dword [ebp + 0xc], ecx
mov esi, dword [ecx - 8]
push dword [ecx]
add esi, edi
push esi
call dword [sym.imp.KERNEL32.dll_VirtualLock]
mov eax, dword [ebp + 0xc]
push dword [eax]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualUnlock]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0xc]
inc eax
add ecx, 0xc
mov dword [ebp - 4], eax
mov dword [ebp + 0xc], ecx
cmp eax, dword [ebx]
jbe 0x401d7e
mov edi, dword [ebp - 8]
mov ecx, dword [ebp + 8]
inc edi
add ebx, 0x18
mov dword [ebp - 8], edi
cmp edi, dword [ecx + 0x10c]
jb 0x401d63
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x4028d4
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x406008]
xor eax, ebp
mov dword [ebp - 4], eax
mov al, byte [0x407a31]
push ebx
test al, al
jne 0x40292d
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00402a8b
cmp dword [ebp - 8], 8
lea ecx, [ebp - 0x1c]
mov edx, dword [ebp - 0xc]
cmovae ecx, dword [ebp - 0x1c]
push 0xa
push ecx
push ecx
call fcn.0040119d
add esp, 0xc
lea ecx, [ebp - 0x1c]
cmp eax, 0xffffffff
sete bl
mov byte [0x407a31], bl
call fcn.00401172
mov al, bl
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00402d98
leave
ret
Function at 0x414ca9
Capabilities:
Terminate process

Disassembly:
call fcn.00413a05
push 0x5c
push 0x414dd8
call fcn.00406695
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov dword [ebp - 4], 0xfffffffe
mov dword [ebp - 4], 1
mov eax, dword fs:[0x18]
mov esi, dword [eax + 4]
mov dword [ebp - 0x20], ebx
mov edi, 0x484b18
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
cmp eax, ebx
jne 0x43a647
xor esi, esi
inc esi
mov eax, dword [0x484b14]
cmp eax, esi
je 0x43a666
mov eax, dword [0x484b14]
test eax, eax
jne 0x414e30
mov dword [0x484b14], esi
push 0x414dd4
push 0x414dc8
call fcn.00517000
pop ecx
pop ecx
test eax, eax
jne 0x43a729
mov eax, dword [0x484b14]
cmp eax, esi
jne 0x414d5c
push 0x414dc4
push 0x414da0
call sub.msvcrt.dll__initterm
pop ecx
pop ecx
mov dword [0x484b14], 2
cmp dword [ebp - 0x20], ebx
jne 0x414d69
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
cmp dword [0x484b24], ebx
jne 0x43a673
mov eax, dword [sym.imp.msvcrt.dll__wcmdln]
cmp dword [eax], ebx
je 0x43a729
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
movzx ecx, word [eax]
cmp cx, 0x20
jbe 0x414e00
cmp cx, 0x22
je 0x43a6c6
inc eax
inc eax
jmp 0x414d84
cmp cx, bx
jne 0x414e3b
movzx ecx, word [eax]
cmp cx, bx
jne 0x43a695
test byte [ebp - 0x40], 1
jne 0x43a6a9
push 0xa
pop ecx
push ecx
push eax
push ebx
push 0x400000
call fcn.00415a17
jmp 0x43a6b2
mov dword [0x484c48], esi
jmp 0x414d38
cmp dword [ebp - 0x1c], ebx
je 0x414e05
jmp 0x414d90
cmp eax, esi
jne 0x43a656
xor esi, esi
inc esi
mov dword [ebp - 0x20], esi
jmp 0x414cff
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x414ceb
push 0x1f
call sub.msvcrt.dll__amsg_exit
pop ecx
jmp 0x414d38
push 0x484b24
call fcn.0047bf42
pop ecx
test eax, eax
je 0x414d75
push ebx
push 2
push ebx
call dword [0x484b24]
jmp 0x414d75
cmp cx, 0x20
ja 0x414e11
inc eax
inc eax
mov dword [ebp - 0x24], eax
jmp 0x414e05
movzx ecx, word [ebp - 0x3c]
jmp 0x414e1e
mov dword [0x484c44], eax
cmp dword [0x484af8], ebx
jne 0x43a706
push eax
call dword [sym.imp.msvcrt.dll_exit]
xor ecx, ecx
cmp dword [ebp - 0x1c], ebx
sete cl
mov dword [ebp - 0x1c], ecx
jmp 0x414d9a
cmp dword [0x484c48], ebx
jne 0x43a714
call dword [sym.imp.msvcrt.dll__cexit]
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [0x484c44]
jmp 0x43a735
mov dword [ebp - 4], 0xfffffffe
mov eax, 0xff
call fcn.0040676a
ret