joyce8/EMBER2024-capa huggingface dataset:
Function at 0x406fe6
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x40e718
call fcn.00408758
mov edi, 0x94
mov eax, edi
call fcn.0040c390
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x411d00], ecx
mov eax, dword [esi + 4]
mov dword [0x411d0c], eax
mov edx, dword [esi + 8]
mov dword [0x411d10], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x411d04], esi
cmp ecx, 2
je 0x407046
or esi, 0x8000
mov dword [0x411d04], esi
shl eax, 8
add eax, edx
mov dword [0x411d08], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x407081
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x407081
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x407099
cmp eax, 0x20b
je 0x407086
mov dword [ebp - 0x1c], esi
jmp 0x4070ad
cmp dword [ecx + 0x84], 0xe
jbe 0x407081
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x4070a7
cmp dword [ecx + 0x74], 0xe
jbe 0x407081
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.00409705
pop ecx
test eax, eax
jne 0x4070d9
cmp dword [0x411c98], 1
jne 0x4070c6
call fcn.0040bb56
push 0x1c
call fcn.0040b9df
push 0xff
call fcn.0040a856
pop ecx
pop ecx
call fcn.0040c2ff
mov dword [ebp - 4], esi
call fcn.0040c154
test eax, eax
jge 0x4070f2
push 0x1b
call fcn.00406fc1
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x4133a0], eax
call fcn.0040c032
mov dword [0x411c90], eax
call fcn.0040bf90
test eax, eax
jge 0x407118
push 8
call fcn.00406fc1
pop ecx
call fcn.0040bd5d
test eax, eax
jge 0x407129
push 9
call fcn.00406fc1
pop ecx
push 1
call fcn.0040a886
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x40713f
push eax
call fcn.00406fc1
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0040bd00
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x407160
movzx eax, word [ebp - 0x40]
jmp 0x407163
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00401d40
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x407181
push edi
call fcn.0040a9b1
call fcn.0040a9d3
jmp 0x4071b3
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00408793
ret
Function at 0x40a4ed
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x412008]
mov eax, dword [0x4111a4]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x40a6b3
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x412020]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x80], ebx
je 0x40a6b3
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x40a557
xor eax, eax
jmp 0x40a6c7
test al, 0x20
je 0x40a568
push 2
push edi
push edi
push ecx
call fcn.0040d277
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40a63d
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x40a684
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x40a5ca
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40a5bb
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x80]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x40a59d
mov edi, eax
lea eax, [ebp - 0x6c]
sub edi, eax
push 0
lea eax, [ebp - 0x78]
push eax
push edi
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a60a
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x40a616
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x40a591
jmp 0x40a618
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x40a6ae
cmp dword [ebp + 0x3a4], edi
je 0x40a684
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x40a676
mov dword [0x411cf8], eax
jmp 0x40a6ba
push edi
lea ecx, [ebp - 0x78]
push ecx
push dword [ebp + 0x3ac]
push dword [ebp + 0x3a8]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a668
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x40a618
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x40a618
push dword [ebp + 0x3a4]
call fcn.0040d218
pop ecx
jmp 0x40a6c4
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40a69c
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x40a550
mov dword [0x411cf4], 0x1c
mov dword [0x411cf8], edi
jmp 0x40a6c4
sub eax, dword [ebp - 0x7c]
jmp 0x40a6c7
and dword [0x411cf8], 0
mov dword [0x411cf4], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.0040678d
add ebp, 0x39c
leave
ret
Function at 0x40a8f0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x411d40], esi
push edi
jne 0x40a910
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x411d3c], esi
mov byte [0x411d38], al
jne 0x40a976
mov ecx, dword [0x412128]
test ecx, ecx
je 0x40a957
mov eax, dword [0x412124]
sub eax, 4
cmp eax, ecx
jmp 0x40a950
mov eax, dword [eax]
test eax, eax
je 0x40a942
call eax
mov eax, dword [0x412124]
sub eax, 4
cmp eax, dword [0x412128]
mov dword [0x412124], eax
jae 0x40a93a
mov eax, 0x411030
mov esi, 0x411038
cmp eax, esi
mov edi, eax
jae 0x40a976
mov eax, dword [edi]
test eax, eax
je 0x40a96f
call eax
add edi, 4
cmp edi, esi
jb 0x40a967
mov eax, 0x41103c
mov esi, 0x411044
cmp eax, esi
mov edi, eax
jae 0x40a995
mov eax, dword [edi]
test eax, eax
je 0x40a98e
call eax
add edi, 4
cmp edi, esi
jb 0x40a986
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x40a9af
push dword [ebp + 8]
mov dword [0x411d40], 1
call fcn.0040a856
pop ebp
ret

Function at 0x40b9df
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x4111a4]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x4116d0]
je 0x40ba14
inc eax
cmp eax, 0x13
jb 0x40ba05
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x4116d0]
jne 0x40bb3a
mov eax, dword [0x411c98]
cmp eax, 1
je 0x40bb12
cmp eax, edx
jne 0x40ba44
cmp dword [0x4111c4], 1
je 0x40bb12
cmp ecx, 0xfc
je 0x40bb3a
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40ba7a
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.0040a280
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00407270
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40baae
mov eax, edi
push eax
call fcn.00407270
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x40ee7c
push edi
call fcn.00406d60
add esp, 0x10
push edi
call fcn.00407270
push dword [esi + 0x4116d4]
mov ebx, eax
call fcn.00407270
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.0040c390
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0040a280
push edi
push ebx
call fcn.0040a290
push 0x40ee78
push ebx
call fcn.0040a290
push dword [esi + 0x4116d4]
push ebx
call fcn.0040a290
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040ccfc
add esp, 0x2c
jmp 0x40bb3a
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x4116d4]
push dword [esi]
call fcn.00407270
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.0040678d
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x40c63c
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.0040c390
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40c6d7
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x411d00]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x40c6d7
cmp eax, 1
je 0x40c6f8
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40c6d7
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x40c6a4
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40c6d3
xor eax, eax
inc eax
jmp 0x40c717
cmp edi, eax
jae 0x40c6db
xor eax, eax
jmp 0x40c717
cmp eax, esi
jae 0x40c6e2
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x411d00]
jmp 0x40c6fb
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40ccfc
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x411ed0], ebx
push esi
push edi
jne 0x40cd7c
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x40cdb7
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x411ed0], eax
je 0x40cdb7
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x411ed4], eax
call esi
cmp dword [0x411d00], 2
mov dword [0x411ed8], eax
jne 0x40cd7c
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x411ee0], eax
je 0x40cd7c
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x411edc], eax
mov eax, dword [0x411edc]
test eax, eax
je 0x40cdc1
call eax
test eax, eax
je 0x40cda8
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x411ee0]
test eax, eax
je 0x40cda8
test byte [ebp - 8], 1
jne 0x40cdc1
cmp dword [0x411d0c], 4
jb 0x40cdbb
or byte [ebp + 0x12], 0x20
jmp 0x40cde0
xor eax, eax
jmp 0x40cdf0
or byte [ebp + 0x12], 4
jmp 0x40cde0
mov eax, dword [0x411ed4]
test eax, eax
je 0x40cde0
call eax
mov ebx, eax
test ebx, ebx
je 0x40cde0
mov eax, dword [0x411ed8]
test eax, eax
je 0x40cde0
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x411ed0]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40cdf5
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x40ce23
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x40ce2a
cmp ebx, dword [eax + 4]
jae 0x40ce2a
xor eax, eax
jmp 0x40d01a
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x40ce3b
xor eax, eax
inc eax
jmp 0x40d019
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x40ce51
cmp ecx, edx
jae 0x40cf96
cmp dword [eax + 4], 0
je 0x40ce5a
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x40ce42
cmp dword [ebp + 8], 0
je 0x40ce7c
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x40cf96
cmp eax, esi
jae 0x40cf96
mov eax, dword [0x411ee8]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x40cea1
cmp dword [esi*4 + 0x411ef0], edi
je 0x40cf9a
inc esi
cmp esi, eax
jl 0x40ce8f
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40d016
cmp dword [ebp - 8], 0x1000000
jne 0x40d016
test byte [ebp - 0xc], 0xcc
je 0x40cf1f
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x40d016
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x40d016
cmp word [eax + 0x18], 0x10b
jne 0x40d016
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x40d016
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x40cf1f
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x40cf1f
test byte [ecx + 0x27], 0x80
jne 0x40cf96
push 1
push 0x411f30
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x40ce33
mov ecx, dword [0x411ee8]
test ecx, ecx
mov edx, ecx
jle 0x40cf53
lea eax, [ecx*4 + 0x411eec]
cmp dword [eax], edi
je 0x40cf53
dec edx
sub eax, 4
test edx, edx
jg 0x40cf47
test edx, edx
jne 0x40cf84
push 0xf
pop ebx
cmp ecx, ebx
jg 0x40cf60
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x40cf78
lea eax, [edx*4 + 0x411ef0]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x40cf66
cmp ecx, 0x10
jge 0x40cf84
inc ecx
mov dword [0x411ee8], ecx
push 0
push 0x411f30
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x40ce33
xor eax, eax
jmp 0x40d019
test esi, esi
jle 0x40ce33
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x411f30
call ebx
test eax, eax
jne 0x40ce33
cmp dword [esi*4 + 0x411ef0], edi
je 0x40cff0
mov eax, dword [0x411ee8]
lea esi, [eax - 1]
test esi, esi
jl 0x40cfde
cmp dword [esi*4 + 0x411ef0], edi
je 0x40cfda
dec esi
jns 0x40cfce
test esi, esi
jge 0x40cfee
cmp eax, 0x10
jge 0x40cfe9
inc eax
mov dword [0x411ee8], eax
lea esi, [eax - 1]
jmp 0x40cff0
je 0x40d008
xor ecx, ecx
test esi, esi
jl 0x40d008
lea eax, [ecx*4 + 0x411ef0]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x40cff6
push 0
push 0x411f30
call ebx
jmp 0x40ce33
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40d3cc
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
cmp esi, dword [0x412008]
push edi
jae 0x40d5a1
mov eax, esi
sar eax, 5
lea edi, [eax*4 + 0x412020]
mov eax, dword [edi]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x40d5a1
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
je 0x40d477
test dl, 2
jne 0x40d477
test dl, 0x48
je 0x40d441
cmp byte [eax + 5], 0xa
je 0x40d441
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea ecx, [ebx + 1]
mov dword [ebp - 0xc], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push ecx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40d48a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x40d472
mov dword [0x411cf8], ecx
jmp 0x40d5a8
cmp eax, 0x6d
jne 0x40d47e
xor eax, eax
jmp 0x40d5b5
push eax
call fcn.0040d218
pop ecx
jmp 0x40d5b2
mov eax, dword [ebp - 0x10]
mov ecx, dword [edi]
add dword [ebp - 0xc], eax
test byte [ecx + esi + 4], 0x80
je 0x40d59c
test eax, eax
je 0x40d4b1
cmp byte [ebx], 0xa
jne 0x40d4b1
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x40d4ba
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
add ecx, eax
cmp eax, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
jae 0x40d596
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x40d586
cmp al, 0xd
je 0x40d4ec
mov byte [ebx], al
inc ebx
inc dword [ebp - 8]
jmp 0x40d578
dec ecx
cmp dword [ebp - 8], ecx
jae 0x40d506
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x40d501
add dword [ebp - 8], 2
jmp 0x40d55a
mov dword [ebp - 8], eax
jmp 0x40d574
inc dword [ebp - 8]
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40d52e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40d574
cmp dword [ebp - 0x10], 0
je 0x40d574
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x40d54f
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40d55a
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x40d577
cmp ebx, dword [ebp + 0xc]
jne 0x40d55f
cmp byte [ebp - 1], 0xa
jne 0x40d55f
mov byte [ebx], 0xa
jmp 0x40d577
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040a9f1
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x40d578
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x40d4d0
jmp 0x40d596
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x40d596
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp - 0xc]
jmp 0x40d5b5
and dword [0x411cf8], 0
mov dword [0x411cf4], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401570
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x425390
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x34
push ebx
push esi
push edi
lea eax, [ebp - 0x18]
mov dword [ebp - 0x10], esp
xor esi, esi
push eax
mov dword [ebp - 4], esi
mov dword [ebp - 0x18], esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov cl, byte [ebp - 0x11]
push esi
mov byte [ebp - 0x30], cl
push esi
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x1c], eax
call fcn.00401d70
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], esi
mov bl, byte [ebp - 0x11]
mov byte [ebp - 4], 1
mov esi, 1
cmp dword [ebp - 0x18], esi
jle 0x40162f
mov edx, dword [ebp - 0x1c]
mov edi, dword [edx + esi*4]
push 0
lea ecx, [ebp - 0x40]
mov byte [ebp - 0x40], bl
call fcn.00401cc0
push edi
call fcn.00417a27
add esp, 4
push eax
push edi
lea ecx, [ebp - 0x40]
call fcn.00401fa0
lea eax, [ebp - 0x40]
push eax
mov byte [ebp - 4], 2
call fcn.00406b10
mov edx, dword [ebp - 0x2c]
add esp, 4
lea ecx, [ebp - 0x40]
push ecx
push edx
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x30]
call fcn.00401d10
push 1
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 1
call fcn.00401cc0
inc esi
jmp 0x4015cf
lea ecx, [ebp - 0x30]
push ecx
push 0
call fcn.00406990
add esp, 8
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0
call fcn.00401af0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x402cb0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 8]
sub esp, 0x44
push ebx
push esi
push edi
mov edi, dword [esp + 0x54]
push eax
and ecx, 0xffff
push ecx
push 0xa
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceExA]
mov esi, eax
test esi, esi
jne 0x402d07
mov edx, dword [0x4271a0]
push edx
push str.cant_find_resource_specified
push 0x227
push str.C:SVNHome_build3.0.5160.macGuest_Win_GuestToolsSharedApplicationsSharedHostApplications_srclibma_resop.cpp
lea ecx, [esp + 0x1c]
call fcn.00409bc0
push 0x429a20
lea eax, [esp + 0x10]
push eax
call fcn.00417f43
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
test ebx, ebx
jne 0x402d43
mov ecx, dword [0x4271a0]
push ecx
push str.cant_get_size_of_resource
push 0x22b
push str.C:SVNHome_build3.0.5160.macGuest_Win_GuestToolsSharedApplicationsSharedHostApplications_srclibma_resop.cpp
lea ecx, [esp + 0x1c]
call fcn.00409bc0
push 0x429a20
lea edx, [esp + 0x10]
push edx
call fcn.00417f43
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x402d7c
mov eax, dword [0x4271a0]
push eax
push str.cant_load_resource
push 0x22f
push str.C:SVNHome_build3.0.5160.macGuest_Win_GuestToolsSharedApplicationsSharedHostApplications_srclibma_resop.cpp
lea ecx, [esp + 0x1c]
call fcn.00409bc0
push 0x429a20
lea ecx, [esp + 0x10]
push ecx
call fcn.00417f43
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
jne 0x402db5
mov edx, dword [0x4271a0]
push edx
push str.cant_lock_resource
push 0x233
push str.C:SVNHome_build3.0.5160.macGuest_Win_GuestToolsSharedApplicationsSharedHostApplications_srclibma_resop.cpp
lea ecx, [esp + 0x1c]
call fcn.00409bc0
push 0x429a20
lea eax, [esp + 0x10]
push eax
call fcn.00417f43
mov ecx, dword [esp + 0x5c]
pop edi
pop esi
mov dword [ecx], ebx
pop ebx
add esp, 0x44
ret
Function at 0x407d18
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x425693
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push esi
mov esi, ecx
push edi
mov dword [esp + 0x10], esi
call fcn.0040c61f
lea ecx, [esp + 0xc]
mov dword [esi + 0x34], eax
call fcn.0040c305
mov edi, dword [0x432570]
lea ecx, [esp + 8]
call fcn.0040c305
mov eax, dword [edi + 4]
cmp eax, 0xffffffff
jae 0x407d4c
inc eax
mov dword [edi + 4], eax
lea ecx, [esp + 8]
call fcn.0040c3a1
lea ecx, [esp + 0xc]
call fcn.0040c3a1
xor edi, edi
lea eax, [esi + 4]
mov dword [esi + 0xc], eax
lea ecx, [esi + 0x14]
mov dword [esi + 0x1c], ecx
lea edx, [esi + 0x18]
mov dword [esi + 0x20], edx
lea eax, [esi + 8]
mov dword [esi + 0x10], eax
mov dword [esi], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
lea ecx, [esi + 0x24]
mov dword [esi + 0x2c], ecx
lea edx, [esi + 0x28]
mov dword [esi + 0x30], edx
mov dword [eax], edi
mov eax, dword [esi + 0x20]
mov dword [eax], edi
mov ecx, dword [esi + 0x30]
push edi
push edi
mov dword [ecx], edi
push edi
mov ecx, esi
mov dword [esp + 0x28], edi
call fcn.00404500
mov cl, byte [esp + 0x24]
xor eax, eax
test cl, 1
mov dword [esi], 0x4271a8
jne 0x407dba
mov eax, 4
test cl, 2
jne 0x407dc2
or eax, 2
mov edx, dword [esi + 0xc]
mov dword [esi + 0x44], eax
mov dword [esi + 0x38], edi
mov dword [esi + 0x3c], edi
mov dword [esi + 0x40], 0x20
mov dword [edx], edi
mov eax, dword [esi + 0x1c]
mov dword [eax], edi
mov ecx, dword [esi + 0x2c]
mov dword [ecx], edi
mov edx, dword [esi + 0x10]
mov dword [edx], edi
mov eax, dword [esi + 0x20]
mov dword [eax], edi
mov ecx, dword [esi + 0x30]
mov dword [ecx], edi
mov ecx, dword [esp + 0x14]
pop edi
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x18
ret 4