joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4083f0
Capabilities:
Create directory

Disassembly:
sub esp, 0x64
push ebx
mov ebx, dword [esp + 0x6c]
push ebp
push esi
push edi
push ebx
xor edi, edi
call fcn.004059a0
mov ebp, dword [esp + 0x80]
add esp, 4
mov esi, eax
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push str..exe
push esi
call fcn.0040b5d0
add esp, 8
test eax, eax
jne 0x40843b
push ebp
push ebx
call fcn.00409030
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
push str..ldx
push esi
call fcn.0040b5d0
add esp, 8
test eax, eax
jne 0x40850d
push 0x42f15c
push ebx
mov dword [esp + 0x80], eax
call fcn.0040b7a0
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x4084df
xor eax, eax
mov ecx, 0x19
lea edi, [esp + 0x10]
push eax
push eax
push ebp
rep stosd dword es:[edi], eax
call fcn.0040bbbf
push ebp
push 0x19
lea eax, [esp + 0x24]
push 1
push eax
call fcn.0040b8ec
add esp, 0x1c
mov esi, str.LeaderCab
lea eax, [esp + 0x10]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4084c0
test cl, cl
je 0x4084bc
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4084c0
add eax, 2
add esi, 2
test cl, cl
jne 0x40849c
xor eax, eax
jmp 0x4084c5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
mov esi, 1
je 0x4084d2
mov esi, dword [esp + 0x78]
push ebp
call fcn.0040b6f2
add esp, 4
test esi, esi
je 0x4084f7
mov eax, dword [esp + 0x7c]
push 1
push eax
push ebx
call fcn.004095d0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
mov ecx, dword [esp + 0x7c]
push ecx
push ebx
call fcn.00409030
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
push str..ldm
push esi
call fcn.0040b5d0
add esp, 8
test eax, eax
jne 0x408532
push eax
push ebp
push ebx
call fcn.004095d0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
push str..lddat
push esi
call fcn.0040b5d0
add esp, 8
test eax, eax
jne 0x408556
push ebp
push ebx
call fcn.00409a10
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
Function at 0x40a210
Capabilities:
Create directory

Disassembly:
push 0xffffffffffffffff
push 0x425960
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push esi
push edi
mov edi, dword [esp + 0x24]
push 0
push edi
call ebx
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x20]
push eax
call fcn.0041d17c
lea ecx, [esp + 0x20]
lea edx, [esp + 0x24]
push ecx
push edx
mov dword [esp + 0x20], 0
call fcn.004058f0
add esp, 8
lea ecx, [esp + 0x20]
mov byte [esp + 0x18], 2
call fcn.0041d10e
push 0x42f0c8
lea ecx, [esp + 0x28]
call fcn.0041d3b6
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x24]
not ecx
dec ecx
mov esi, ecx
mov ecx, dword [eax - 8]
inc esi
cmp esi, ecx
jge 0x40a2c7
cmp byte [esi + eax], 0x5c
jne 0x40a2bf
lea eax, [esp + 0xc]
push esi
push eax
lea ecx, [esp + 0x2c]
call fcn.0041c32a
mov ecx, dword [esp + 0xc]
push 0
push ecx
call ebx
lea ecx, [esp + 0xc]
call fcn.0041d10e
mov eax, dword [esp + 0x24]
mov ecx, dword [eax - 8]
inc esi
cmp esi, ecx
jl 0x40a294
lea ecx, [esp + 0x24]
mov dword [esp + 0x18], 0xffffffff
call fcn.0041d10e
mov ecx, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret

Function at 0x40a5a0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov eax, dword [esp + 4]
push ebx
push ebp
xor edx, edx
lea ebp, [eax + 8]
push esi
mov dword [eax], edx
mov dword [eax + 4], edx
push edi
xor eax, eax
mov ecx, ebp
mov dword [ecx], eax
inc eax
add ecx, 4
cmp eax, 0x100
jl 0x40a5b6
mov ebx, dword [esp + 0x18]
xor ecx, ecx
mov esi, ebp
mov dword [esp + 0x14], 0x100
mov edi, dword [esi]
xor eax, eax
mov al, byte [edx + ebx]
add eax, edi
add ecx, eax
and ecx, 0x800000ff
jns 0x40a5ee
dec ecx
or ecx, 0xffffff00
inc ecx
mov eax, dword [ebp + ecx*4]
mov dword [esi], eax
lea eax, [edx + 1]
cdq
idiv dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
add esi, 4
dec eax
mov dword [ebp + ecx*4], edi
mov dword [esp + 0x14], eax
jne 0x40a5d3
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x40a620
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
sub esp, 0x40c
lea edx, [esp + 4]
push ebx
push ebp
push eax
push ecx
push edx
call fcn.0040a5a0
mov ebp, dword [esp + 0x428]
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
add esp, 0xc
xor ecx, ecx
test ebp, ebp
jle 0x40a6a5
push esi
push edi
mov edi, dword [esp + 0x420]
jmp 0x40a663
mov al, byte [esp + 0x10]
inc al
and eax, 0xff
mov dword [esp + 0x10], eax
mov edx, dword [esp + eax*4 + 0x1c]
lea esi, [esp + eax*4 + 0x1c]
mov al, dl
add al, bl
and eax, 0xff
mov ebx, eax
mov eax, dword [esp + ebx*4 + 0x1c]
mov dword [esi], eax
add al, dl
and eax, 0xff
mov dword [esp + ebx*4 + 0x1c], edx
mov dl, byte [esp + eax*4 + 0x1c]
mov al, byte [ecx + edi]
xor al, dl
mov byte [ecx + edi], al
inc ecx
cmp ecx, ebp
jl 0x40a65f
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40c
ret
Function at 0x420d36
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x420d78
call fcn.00423ed5
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x420d78
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x420d6f
xor eax, eax
jmp 0x420d80
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00420d86
pop edi
pop esi
pop ebx
ret 4

Function at 0x4245b1
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x4245df
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4245fd
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.00424517
jmp 0x4245fd
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4245fd
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.00424517
test edi, edi
mov eax, edi
jne 0x4245e7
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x401000
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov ecx, dword [esp + 0xc]
sub esp, 0x21c
lea eax, [esp]
push eax
push ecx
call fcn.00401170
add esp, 8
test eax, eax
jne 0x40102a
mov eax, 1
add esp, 0x21c
ret 0x10
lea edx, [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40105a
lea eax, [esp + 0x14]
push eax
push str.Unable_to_find_the_file__s._r_n
call fcn.00401130
add esp, 8
mov eax, 1
add esp, 0x21c
ret 0x10
lea ecx, [esp + 0x118]
push 0x104
lea edx, [esp + 0x18]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
test eax, eax
jne 0x40109d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x18]
push eax
push str.Unable_to_convert__s_to_a_short_name:_0x_lx._r_n
call fcn.00401130
add esp, 0xc
mov eax, 1
add esp, 0x21c
ret 0x10
lea ecx, [esp + 0x14]
push ecx
call fcn.00401390
add esp, 4
cmp eax, 2
mov dword [esp + 0x10], eax
jne 0x4010d3
lea edx, [esp + 0x14]
push edx
push str._s_must_be_a_ZIP_or_CAB_file._r_n
call fcn.00401130
add esp, 8
mov eax, 1
add esp, 0x21c
ret 0x10
mov eax, dword [esp]
test eax, eax
je 0x4010fd
lea eax, [esp + 0x118]
push eax
call fcn.004018b0
add esp, 4
test eax, eax
jne 0x401124
mov eax, 1
add esp, 0x21c
ret 0x10
lea ecx, [esp]
lea edx, [esp + 0x118]
push ecx
push edx
call fcn.004013f0
add esp, 8
test eax, eax
jne 0x401124
mov eax, 1
add esp, 0x21c
ret 0x10
xor eax, eax
add esp, 0x21c
ret 0x10

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

Disassembly:
mov eax, dword [esp + 4]
push ebx
mov ebx, dword [esp + 0xc]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
push edi
push eax
push ebx
xor edi, edi
call ebp
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x4015e6
mov esi, dword [sym.imp.USER32.dll_CharNextA]
cmp cl, 0x2e
jne 0x4015dd
mov edi, eax
push eax
call esi
mov cl, byte [eax]
test cl, cl
jne 0x4015d6
test edi, edi
je 0x4015fe
push str..cer
push edi
call ebp
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x401601
mov byte [ebx], 0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret
Function at 0x4019a0
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x420
lea ecx, [esp + 0x31c]
push ebx
push ebp
push esi
push edi
push eax
push str.file:___s
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea edx, [esp + 0x10]
push edx
push 0x20019
push 0
push str.SoftwareMicrosoftCode_Store_DatabaseDistribution_Units
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x4019f0
push eax
push str.Unable_to_open_distribution_unit_registry_key:__lu_r_n
jmp 0x401b24
mov edx, dword [esp + 0x10]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
push 0
push 0
push 0
lea eax, [esp + 0x20]
push 0
lea ecx, [esp + 0x30]
push eax
push ecx
mov ebx, 0x104
push 0
push edx
mov dword [esp + 0x34], ebx
mov edi, 1
call ebp
mov esi, eax
test esi, esi
jne 0x401afc
lea eax, [esp + 0x20]
lea ecx, [esp + 0x228]
push eax
push str._sDownloadInformation
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [esp + 0x1c]
add esp, 0xc
lea edx, [esp + 0x18]
lea eax, [esp + 0x228]
push edx
push 0x20019
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x401ad1
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x1c]
lea eax, [esp + 0x124]
push edx
push eax
push 0
push 0
push str.CODEBASE
push ecx
mov dword [esp + 0x34], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x401ac6
mov edx, dword [esp + 0x434]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea eax, [esp + 0x124]
push edx
push eax
call esi
test eax, eax
je 0x401b39
lea ecx, [esp + 0x32c]
lea edx, [esp + 0x124]
push ecx
push edx
call esi
test eax, eax
je 0x401b39
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
push 0
push 0
lea ecx, [esp + 0x20]
push 0
lea edx, [esp + 0x30]
mov eax, edi
push ecx
push edx
push eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x30], ebx
push eax
inc edi
call ebp
mov esi, eax
test esi, esi
je 0x401a29
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, 0x103
je 0x401b17
push esi
push str.Error_accessing_registry:__lu_r_n
jmp 0x401b24
mov ecx, dword [esp + 0x434]
push ecx
push str.File__s_is_not_installed._r_n
call fcn.00401130
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x420
ret
mov ecx, dword [esp + 0x43c]
mov eax, dword [esp + 0x438]
lea edx, [esp + 0x20]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov ecx, dword [esp + 0x18]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
call esi
mov edx, dword [esp + 0x10]
push edx
call esi
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x420
ret
Function at 0x401df0
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x407358
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push esi
push edi
mov esi, ecx
call fcn.00402150
mov eax, dword [esp + 0x34]
lea ecx, [esp + 0x10]
push eax
call fcn.00401ba0
push 0
push pe_nt_image_headers32
push 3
push 0
push 1
push SysReAllocString
mov ecx, eax
mov dword [esp + 0x44], 0
call fcn.00401bf0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
lea ecx, [esp + 0x10]
mov dword [esi], eax
mov dword [esp + 0x2c], 0xffffffff
call fcn.00401bc0
mov eax, dword [esi]
cmp eax, 0xffffffff
jne 0x401e68
mov edi, 0x80004005
jmp 0x401ea2
lea ecx, [esp + 0xc]
push 0
push ecx
lea edx, [esp + 0x10]
push 4
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x401e88
mov edi, 0x80004005
jmp 0x401ea2
cmp dword [esp + 8], 0x4034b50
je 0x401e99
mov edi, 0x80004005
jmp 0x401ea2
mov ecx, esi
call fcn.004021c0
mov edi, eax
test edi, edi
jge 0x401ead
mov ecx, esi
call fcn.00402150
mov ecx, dword [esp + 0x24]
mov eax, edi
pop edi
mov dword fs:[0], ecx
pop esi
add esp, 0x28
ret 4
Function at 0x401ed0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x24
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov edi, dword [esp + 0x38]
mov eax, dword [esi + 8]
xor ebp, ebp
cmp edi, eax
jb 0x401ef5
mov eax, 0x80004005
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 8
mov eax, dword [esp + 0x3c]
test eax, eax
jne 0x401f0c
mov eax, 0x80004003
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 8
mov eax, dword [esi + 4]
shl edi, 4
add eax, edi
mov ecx, dword [eax + 0xc]
test ecx, ecx
jne 0x40201f
mov ebx, dword [eax + 4]
mov ecx, dword [esi]
push 0
push 0
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, ebx
je 0x401f3e
mov ebx, 0x80004005
jmp 0x40203b
mov ecx, dword [esi]
lea edx, [esp + 0x38]
push 0
push edx
lea eax, [esp + 0x1c]
push 0x1e
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x401f63
mov ebx, 0x80004005
jmp 0x40203b
mov edx, dword [esi + 4]
mov eax, dword [esp + 0x26]
cmp eax, dword [edi + edx + 8]
je 0x401f7a
mov ebx, 0x80004005
jmp 0x40203b
mov ecx, dword [esp + 0x2e]
mov edx, dword [esp + 0x30]
mov eax, dword [esi]
and ecx, 0xffff
and edx, 0xffff
push 1
add ecx, edx
push 0
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esi + 4]
mov edx, dword [edi + ecx + 8]
push edx
push 0x22
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebp, eax
test ebp, ebp
jne 0x401fc3
mov eax, 0x8007000e
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 8
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ecx, dword [esi + 4]
mov ebx, eax
lea eax, [esp + 0x38]
push 0
mov edx, dword [edi + ecx + 8]
push eax
mov eax, dword [esi]
push edx
push ebx
push eax
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x401fff
mov ecx, dword [esp + 0x10]
mov ebx, 0x80004005
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
jmp 0x40203b
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov edx, dword [esi + 4]
lea eax, [edi + edx + 0xc]
push eax
push 1
push ebp
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
mov ebx, eax
test ebx, ebx
jl 0x40203b
xor ebp, ebp
mov ecx, dword [esi + 4]
mov eax, dword [esp + 0x3c]
mov edx, dword [edi + ecx + 0xc]
mov dword [eax], edx
mov ecx, dword [esi + 4]
mov edi, dword [edi + ecx + 0xc]
push edi
mov edx, dword [edi]
call dword [edx + 4]
xor ebx, ebx
test ebp, ebp
je 0x402046
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x24
ret 8
Function at 0x402410
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0x22c
mov eax, dword [esp + 0x230]
push ebp
xor ebp, ebp
push edi
cmp eax, ebp
mov edi, ecx
mov dword [esp + 8], ebp
jne 0x40243b
mov eax, 0x80004003
pop edi
pop ebp
add esp, 0x22c
ret 4
mov eax, dword [edi]
push esi
push ebx
push ebp
push eax
mov dword [esp + 0x40], ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, eax
cmp ecx, 0x10016
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ecx
jb 0x402465
mov dword [esp + 0x1c], 0x10016
mov esi, dword [esp + 0x18]
jmp 0x40246f
mov ecx, dword [esp + 0x18]
cmp ebp, dword [esp + 0x1c]
jg 0x4024fa
mov ebx, dword [esp + 0x38]
lea eax, [ebp + 0x200]
cmp eax, ecx
jb 0x402489
mov eax, ecx
mov ecx, dword [edi]
push 2
neg eax
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [edi]
lea edx, [esp + 0x14]
push 0
push edx
lea eax, [esp + 0x40]
push 0x200
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4024fa
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x38]
add ebp, eax
lea eax, [esp + eax + 0x38]
lea esi, [eax - 1]
mov dword [eax], ebx
cmp esi, edx
jb 0x4024ee
cmp byte [esi], 0x50
jne 0x4024db
cmp dword [esi], 0x6054b50
je 0x4024e6
dec esi
lea eax, [esp + 0x38]
cmp esi, eax
jae 0x4024ce
jmp 0x4024ee
mov dword [esp + 0x10], 1
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40246b
mov eax, dword [esp + 0x10]
test eax, eax
je 0x402562
mov edx, dword [edi]
lea ecx, [esp + 0x38]
sub esi, ecx
push 2
sub esi, ebp
push 0
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edx
call esi
mov edx, dword [edi]
lea eax, [esp + 0x14]
push 0
push eax
lea ecx, [esp + 0x28]
push 0x16
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
mov dword [esp + 0x10], eax
je 0x40255a
mov eax, dword [esp + 0x30]
mov ecx, dword [edi]
push 0
push 0
push eax
push ecx
call esi
mov edx, dword [esp + 0x2a]
mov eax, dword [esp + 0x240]
and edx, 0xffff
mov dword [eax], edx
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x402581
mov ecx, dword [esp + 0x240]
pop ebx
mov eax, 0x80004005
pop esi
mov dword [ecx], 0
pop edi
pop ebp
add esp, 0x22c
ret 4
pop ebx
pop esi
pop edi
xor eax, eax
pop ebp
add esp, 0x22c
ret 4
Function at 0x402af0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x408038
push 0x405408
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 [0x40c184], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x40c180], ecx
shl ecx, 8
add ecx, edx
mov dword [0x40c17c], ecx
shr eax, 0x10
mov dword [0x40c178], eax
call fcn.004053c0
test eax, eax
jne 0x402b5a
push 0x1c
call fcn.00402c90
add esp, 4
mov dword [ebp - 4], 0
call fcn.004051c0
call fcn.004051b0
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40d584], eax
call fcn.00404d80
mov dword [0x40c144], eax
test eax, eax
je 0x402b8d
mov eax, dword [0x40d584]
test eax, eax
jne 0x402b97
push 0xffffffffffffffff
call fcn.004046e0
add esp, 4
call fcn.00404ad0
call fcn.004049e0
call fcn.004046b0
mov esi, dword [0x40d584]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x402c76
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x402bde
test al, al
je 0x402bde
and eax, 0xff
push eax
call fcn.00404980
add esp, 4
test eax, eax
je 0x402bb8
inc esi
mov dword [ebp - 0x64], esi
jmp 0x402bb8
cmp byte [esi], 0x22
jne 0x402be7
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x402bf7
cmp al, 0x20
ja 0x402bf7
inc esi
mov dword [ebp - 0x64], esi
jmp 0x402be7
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x402c18
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x402c1d
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.004046e0
jmp 0x402c5b
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 0x402be7
inc esi
mov dword [ebp - 0x64], esi
jmp 0x402c76

Function at 0x404720
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x40c1b4]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x40473f
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 [0x40c1b0], 1
mov byte [0x40c1ac], bl
jne 0x404799
mov ecx, dword [0x40c568]
test ecx, ecx
je 0x404787
mov esi, dword [0x40c564]
sub esi, 4
cmp esi, ecx
jb 0x404787
mov eax, dword [esi]
test eax, eax
je 0x404780
call eax
mov ecx, dword [0x40c568]
sub esi, 4
cmp esi, ecx
jae 0x404772
push 0x409020
push 0x409018
call fcn.004047d0
add esp, 8
push 0x40902c
push 0x409024
call fcn.004047d0
add esp, 8
test ebx, ebx
jne 0x4047c0
push ebp
mov dword [0x40c1b4], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret
Function at 0x404d80
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x40c2c8]
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 0x404dc2
call edi
mov esi, eax
test esi, esi
je 0x404dac
mov eax, 1
jmp 0x404dbd
call ebp
mov ebx, eax
test ebx, ebx
je 0x404ecf
mov eax, 2
mov dword [0x40c2c8], eax
cmp eax, 1
jne 0x404e62
test esi, esi
jne 0x404ddb
call edi
mov esi, eax
test esi, esi
je 0x404ecf
cmp word [esi], 0
mov eax, esi
je 0x404df5
add eax, 2
cmp word [eax], 0
jne 0x404de3
add eax, 2
cmp word [eax], 0
jne 0x404de3
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 0x404e54
push edi
call fcn.00404600
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x404e54
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 0x404e46
push ebx
call fcn.004045b0
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 0x404ecf
test ebx, ebx
jne 0x404e73
call ebp
mov ebx, eax
test ebx, ebx
je 0x404ecf
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x404e8b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x404e7b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x404e7b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00404600
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x404ead
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