joyce8/EMBER2024-capa huggingface dataset:
Function at 0x470fb0
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x4c2718
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push edi
mov edi, ecx
mov eax, dword [edi + 0x118]
test eax, eax
jne 0x471060
mov eax, dword [0x517a24]
push esi
mov dword [esp + 8], eax
push 0x104
push 0x104
lea ecx, [esp + 0x10]
mov dword [esp + 0x1c], 0
call fcn.004b3276
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 0xffffffffffffffff
lea ecx, [esp + 0xc]
call fcn.004b32c5
push str.winhlp32.exe
lea ecx, [esp + 0xc]
call fcn.004b3222
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x471047
push 0x6a
push esi
call dword [sym.imp.USER32.dll_LoadCursorA]
test eax, eax
je 0x471047
push eax
call dword [sym.imp.USER32.dll_CopyIcon]
mov dword [edi + 0x118], eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea ecx, [esp + 8]
mov dword [esp + 0x14], 0xffffffff
call fcn.004b2e92
pop esi
mov ecx, dword [esp + 8]
pop edi
mov dword fs:[0], ecx
add esp, 0x10
ret
Function at 0x474160
Capabilities:
Get number of processors

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4c2ba0
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push esi
push edi
mov edi, dword [esp + 0x30]
mov esi, ecx
mov eax, dword [edi]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x474307
mov ecx, dword [0x517a24]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 0x28], 0
mov dword [esp + 0x30], ecx
mov ecx, dword [eax - 8]
mov bl, 1
test ecx, ecx
mov byte [esp + 0x28], bl
jle 0x47425c
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
push edi
push ecx
mov ecx, esi
call fcn.00472e80
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x2c], 2
call fcn.004b2f7f
lea ecx, [esp + 0x14]
mov byte [esp + 0x28], bl
call fcn.004b2e92
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push 0x515fb4
call fcn.004b2f00
lea edx, [esp + 0x14]
push 0x3d
push edx
lea eax, [esp + 0x24]
push edi
push eax
mov ecx, esi
call fcn.00473240
push eax
lea ecx, [esp + 0x34]
mov byte [esp + 0x2c], 3
call fcn.004b2f7f
lea ecx, [esp + 0x18]
mov byte [esp + 0x28], bl
call fcn.004b2e92
lea ecx, [esp + 0xc]
call fcn.004b335a
mov ecx, dword [esp + 0xc]
push 0x5169f4
push ecx
call fcn.00490204
add esp, 8
test eax, eax
je 0x474284
mov edx, dword [edi]
mov ecx, dword [esp + 0x10]
mov eax, dword [edx - 8]
cmp ecx, eax
jl 0x4741bd
mov esi, dword [esp + 0x34]
lea ecx, [esp + 0x30]
mov byte [esp + 0x28], 0
call fcn.004b2e92
lea ecx, [esp + 0xc]
mov dword [esp + 0x28], 0xffffffff
call fcn.004b2e92
jmp 0x47430b
lea eax, [esp + 0x30]
mov ecx, esi
push eax
call fcn.00473f00
test eax, eax
push 0
je 0x4742ef
lea ecx, [esp + 0x34]
push 0x64
push ecx
mov ecx, esi
call fcn.004725a0
mov ecx, dword [esp + 0x3c]
test ecx, ecx
je 0x4742d5
cmp eax, 0x64
jg 0x4742c3
mov edx, dword [esp + 0x38]
push eax
push 0x64
push edx
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov esi, eax
jmp 0x474260
push 0x64
push eax
mov eax, dword [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov esi, eax
jmp 0x474260
cmp eax, 0x64
jge 0x47425c
mov ecx, dword [esp + 0x34]
push 0x64
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov esi, eax
jmp 0x474260
mov edx, dword [esp + 0x3c]
lea eax, [esp + 0x34]
push edx
push eax
mov ecx, esi
call fcn.004725a0
mov esi, eax
jmp 0x474260
mov esi, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
cmp esi, eax
jl 0x474315
mov eax, esi
mov ecx, dword [esp + 0x20]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
add esp, 0x20
ret 0x10
Function at 0x47d3f0
Capabilities:
Capture webcam image

Disassembly:
mov eax, dword [esp + 8]
push ebx
push esi
mov esi, ecx
mov eax, dword [eax + 4]
cmp dword [esi + 0xec], 1
jne 0x47d493
test eax, eax
jbe 0x47d493
mov ecx, dword [esi + 0xbc]
test ecx, ecx
jle 0x47d493
mov ecx, dword [esi + 0x1c]
push edi
push 0
push eax
push 0x419
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edi, eax
mov eax, dword [esi + 0xbc]
inc edi
test eax, eax
jne 0x47d43e
xor esi, esi
jmp 0x47d444
mov esi, dword [esi + 0xb4]
add esi, 4
xor ebx, ebx
test edi, edi
jbe 0x47d46f
push ebp
mov ebp, edi
add esi, 6
push esi
call fcn.004179f0
add esi, eax
push esi
mov ebx, esi
call fcn.004179f0
add esp, 8
add esi, eax
dec edi
dec ebp
jne 0x47d450
pop ebp
test edi, edi
pop edi
jne 0x47d493
test ebx, ebx
je 0x47d493
mov edx, dword [esp + 0x10]
push 0x4e
add edx, 0x10
push ebx
push edx
call fcn.00490b50
add esp, 0xc
mov eax, 1
pop esi
pop ebx
ret 0xc
pop esi
xor eax, eax
pop ebx
ret 0xc

Function at 0x47d5d5
Capabilities:
Capture webcam image

Disassembly:
sub esp, 0x44
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x47d6ed
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x47d6ed
mov eax, dword [esi + 0x3c]
push eax
call fcn.004b48fa
mov esi, eax
test esi, esi
je 0x47d6ed
mov ebx, dword [esp + 0x58]
mov ecx, dword [esi + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push ebx
push 0x419
push ecx
call ebp
mov edi, eax
test edi, edi
jl 0x47d6ed
mov ecx, esi
call fcn.0047d540
cmp edi, eax
jge 0x47d6ed
mov eax, dword [esi + 0xc4]
mov edx, dword [esi + 0xc0]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x5c]
xor ecx, ecx
mov dword [esp + 0x28], edx
cmp eax, ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x38], edi
jne 0x47d673
mov dword [esp + 0x34], 1
jmp 0x47d6ce
mov edx, dword [esi + 0x1c]
lea ecx, [esp + 0x18]
push ecx
push ebx
push 0x433
push edx
call ebp
test eax, eax
je 0x47d6ed
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x10], ecx
mov dword [eax], 0
mov ecx, dword [esi + 0x1c]
lea eax, [esp + 0x10]
add edx, 2
push eax
push ecx
mov dword [esp + 0x1c], edx
call dword [sym.imp.USER32.dll_ClientToScreen]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x34], 3
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], eax
xor ecx, ecx
push ecx
lea ecx, [esp + 0x2c]
push ecx
push 0x7d8
call fcn.0047bd40
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x44
ret 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x44
ret 0xc
Function at 0x484a00
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x4c3428
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
mov eax, dword [esp + 0x40]
push ebx
push esi
lea ecx, [esp + 8]
push eax
push ecx
mov ecx, dword [esp + 0x4c]
call fcn.00484df0
mov esi, eax
lea edx, [esp + 0x48]
xor ebx, ebx
push edx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x40], ebx
mov dword [esp + 0x4c], 0x5506e4
call fcn.0049174f
mov ecx, dword [0x4f9d40]
mov al, byte [esi]
push ecx
push ebx
push esi
lea ecx, [esp + 0x30]
mov byte [esp + 0x48], 1
mov byte [esp + 0x30], al
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
call fcn.004821b0
mov esi, 0x4f9d98
mov dword [esp + 0x18], esi
mov eax, dword [esp + 0xc]
mov byte [esp + 0x3c], 3
cmp eax, ebx
je 0x484aa7
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x484a9e
cmp al, 0xff
je 0x484a9e
dec al
mov byte [ecx], al
jmp 0x484aa7
push ecx
call fcn.004b2bfc
add esp, 4
lea ecx, [esp + 0x18]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
call fcn.004ae890
mov eax, dword [esp + 0x28]
mov dword [esp + 0x3c], 0xffffffff
cmp eax, ebx
mov dword [esp + 0x18], esi
je 0x484aed
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x484ae4
cmp al, 0xff
je 0x484ae4
dec al
mov byte [ecx], al
jmp 0x484aed
push ecx
call fcn.004b2bfc
add esp, 4
lea ecx, [esp + 0x18]
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
call fcn.004917d6
mov ecx, dword [esp + 0x34]
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x38
ret

Function at 0x488b00
Capabilities:
Check for time delay via gettickcount

Disassembly:
sub esp, 0xa0
push ebx
push ebp
mov ebp, dword [esp + 0xac]
push esi
push edi
push ebp
call sub.RASAPI32.dll_RasHangUpA
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, 0x28
xor eax, eax
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
mov dword [esp + 0x10], 0xa0
call esi
mov edi, eax
call esi
sub eax, edi
cmp eax, 0xbb8
jae 0x488b66
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [esp + 0x10]
push eax
push ebp
call sub.RASAPI32.dll_RasGetConnectStatusA
cmp eax, 6
je 0x488b66
push 0
call ebx
call esi
sub eax, edi
cmp eax, 0xbb8
jb 0x488b47
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa0
ret

Function at 0x488ef0
Capabilities:
Create http request

Disassembly:
push esi
mov esi, ecx
cmp dword [esi], 0
jne 0x488f28
mov edx, dword [esi + 4]
xor eax, eax
push 0
push 0
mov ecx, dword [edx - 8]
test ecx, ecx
setne al
mov ecx, eax
neg ecx
sbb ecx, ecx
and ecx, edx
neg eax
sbb eax, eax
push ecx
and eax, 2
inc eax
push eax
push str.Mozilla_4.0__compatible__MSIE_6.0__Windows_NT_5.0_
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [esi], eax
mov ecx, dword [esi]
xor eax, eax
test ecx, ecx
setne al
pop esi
ret
Function at 0x489bb0
Capabilities:
Get socket status

Disassembly:
sub esp, 0x10c
mov eax, dword [ecx]
lea ecx, [esp]
push ecx
push 0
lea edx, [esp + 0x10]
push 0
push edx
push 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 1
call sub.WS2_32.dll_select
cmp eax, 0xffffffff
jne 0x489bf9
xor eax, eax
add esp, 0x10c
ret 4
mov edx, dword [esp + 0x110]
xor ecx, ecx
test eax, eax
setne cl
mov dword [edx], ecx
mov eax, 1
add esp, 0x10c
ret 4

Function at 0x48a070
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4c3750
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
mov esi, ecx
lea ecx, [esp + 4]
call fcn.00489c20
lea eax, [esp + 4]
lea ecx, [esi + 4]
push eax
mov dword [esp + 0x18], 0
call fcn.00489ca0
lea ecx, [esp + 4]
push ecx
lea ecx, [esi + 0x14]
call fcn.00489ca0
lea ecx, [esi + 0xc]
call fcn.004b2e1d
lea ecx, [esi + 0x10]
call fcn.004b2e1d
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x1c]
call fcn.0048b230
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x30]
call fcn.0048b230
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x44]
call fcn.0048b230
lea ecx, [esp + 8]
mov dword [esp + 0x14], 1
call fcn.004b2e92
lea ecx, [esp + 4]
mov dword [esp + 0x14], 0xffffffff
call fcn.004b2e92
mov ecx, dword [esp + 0xc]
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x4a8ee0
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push 0xffffffffffffffff
push 0x4c4a80
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
mov al, byte [esp + 0x3c]
push ebx
xor ebx, ebx
push esi
mov esi, ecx
mov byte [esp + 0x10], al
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov ecx, dword [esp + 0x44]
push ebx
mov dword [esp + 0x40], ebx
mov byte [esp + 0x28], al
mov edx, dword [ecx]
lea ecx, [esp + 0x28]
mov dword [esp + 0x24], edx
call fcn.0049e0e5
mov eax, dword [0x4fcf88]
lea ecx, [esp + 0x10]
push eax
push ebx
push ecx
lea ecx, [esp + 0x30]
call fcn.0049e017
lea edx, [esp + 0x20]
lea eax, [esp + 8]
push edx
push eax
mov ecx, esi
mov byte [esp + 0x44], 1
call fcn.004a99e0
mov esi, dword [eax]
mov ecx, dword [eax + 4]
mov eax, dword [esp + 0x28]
cmp eax, ebx
mov dword [esp + 0xc], ecx
je 0x4a8f87
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x4a8f7e
cmp al, 0xff
je 0x4a8f7e
dec al
mov byte [ecx], al
jmp 0x4a8f87
push ecx
call fcn.004b2bfc
add esp, 4
mov eax, dword [esp + 0x14]
mov dword [esp + 0x28], ebx
cmp eax, ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
je 0x4a8fb8
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x4a8faf
cmp al, 0xff
je 0x4a8faf
dec al
mov byte [ecx], al
jmp 0x4a8fb8
push ecx
call fcn.004b2bfc
add esp, 4
mov ecx, dword [esp + 0x34]
lea eax, [esi + 0x10]
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x38
ret 4
Function at 0x4b529d
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4b52d5
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.004b32ed
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.004b32c5
jmp 0x4b52e1
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x4b6992
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 0x4b69d4
call fcn.004bc9fb
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4b69d4
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4b69cb
xor eax, eax
jmp 0x4b69dc
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004b69e2
pop edi
pop esi
pop ebx
ret 4

Function at 0x4bcf2b
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 0x4bcf59
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4bcf77
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004bce91
jmp 0x4bcf77
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4bcf77
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004bce91
test edi, edi
mov eax, edi
jne 0x4bcf61
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x401000
Capabilities:
Create process on windows

Disassembly:
mov eax, dword [esp + 0xc]
push esi
xor esi, esi
push eax
call fcn.00401030
add esp, 4
test eax, eax
jne 0x401026
push 1
mov esi, 1
push str.SETUP.EXE
call dword [sym.imp.KERNEL32.dll_WinExec]
mov eax, esi
pop esi
ret 0x10

Function at 0x4010d0
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword fs:[0]
push ebp
mov ebp, esp
push 0xffffffffffffffff
push section..rdata
push 0x4020b4
push eax
mov dword fs:[0], esp
sub esp, 0x60
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [0x404060], eax
xor eax, eax
mov al, byte [0x404061]
mov dword [0x40406c], eax
mov eax, dword [0x404060]
shr dword [0x404060], 0x10
and eax, 0xff
mov dword [0x404068], eax
shl eax, 8
add eax, dword [0x40406c]
mov dword [0x404064], eax
call fcn.00402070
test eax, eax
jne 0x401144
push 0x1c
call fcn.00401270
add esp, 4
mov dword [ebp - 4], 0
call fcn.00401e90
call fcn.00401e80
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x4050a0], eax
call fcn.00401a30
mov dword [0x404040], eax
test eax, eax
je 0x401177
cmp dword [0x4050a0], 0
jne 0x401181
push 0xffffffffffffffff
call fcn.004012d0
add esp, 4
call fcn.004017b0
call fcn.004016c0
call fcn.004012a0
mov esi, dword [0x4050a0]
mov al, byte [esi]
cmp al, 0x22
je 0x4011a8
cmp al, 0x20
jbe 0x4011d5
inc esi
cmp byte [esi], 0x20
ja 0x4011a0
jmp 0x4011d5
inc esi
cmp byte [esi], 0x22
je 0x4011d4
mov bl, byte [ebp - 0x28]
mov bl, byte [esi]
test bl, bl
je 0x4011cf
xor eax, eax
mov al, bl
push eax
call fcn.00401660
add esp, 4
test eax, eax
je 0x4011c9
inc esi
inc esi
cmp byte [esi], 0x22
jne 0x4011b1
cmp byte [esi], 0x22
jne 0x4011d5
inc esi
cmp byte [esi], 0
je 0x4011e5
cmp byte [esi], 0x20
ja 0x4011e5
inc esi
cmp byte [esi], 0
jne 0x4011da
mov dword [ebp - 0x44], 0
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x44], 1
mov eax, 0xa
je 0x401209
mov eax, dword [ebp - 0x40]
and eax, 0xffff
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
push eax
call fcn.004012d0
jmp 0x40124a
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
pop edi
mov dword fs:[0], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x401310
Capabilities:
Terminate process

Disassembly:
cmp dword [0x40409c], 1
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
jne 0x40132e
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x404098], 1
cmp dword [esp + 0x14], 0
mov ebx, dword [esp + 0x18]
mov byte [0x404094], bl
jne 0x401388
cmp dword [0x405098], 0
je 0x401376
mov edi, dword [0x405094]
sub edi, 4
cmp edi, dword [0x405098]
jb 0x401376
mov eax, dword [edi]
test eax, eax
je 0x40136b
call eax
sub edi, 4
cmp edi, dword [0x405098]
jae 0x401363
push 0x404014
push 0x404010
call fcn.004013c0
add esp, 8
push 0x40401c
push 0x404018
call fcn.004013c0
add esp, 8
test ebx, ebx
jne 0x4013af
mov dword [0x40409c], 1
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop edi
pop esi
pop ebx
ret
Function at 0x401a30
Capabilities:
Query environment variable

Disassembly:
sub esp, 4
push ebx
push esi
push edi
xor ebx, ebx
push ebp
xor edi, edi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
cmp dword [0x404140], ebx
jne 0x401a7f
call esi
cmp eax, ebx
mov edi, eax
je 0x401a5d
mov dword [0x404140], 1
jmp 0x401a7f
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
je 0x401a75
mov dword [0x404140], 2
jmp 0x401a7f
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x404140], 1
jne 0x401b2e
test edi, edi
jne 0x401aa2
call esi
mov edi, eax
test edi, edi
jne 0x401aa2
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp word [edi], 0
mov esi, edi
je 0x401abc
add esi, 2
cmp word [esi], 0
jne 0x401aaa
add esi, 2
cmp word [esi], 0
jne 0x401aaa
sub esi, edi
push 0
sar esi, 1
push 0
inc esi
push 0
push 0
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebp, eax
test ebp, ebp
je 0x401b1d
push ebp
call fcn.00402420
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x401b1d
push 0
push 0
push ebp
push ebx
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x401b0c
push ebx
call fcn.004023d0
add esp, 4
xor ebx, ebx
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x404140], 2
jne 0x401bb2
test ebx, ebx
jne 0x401b51
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
jne 0x401b51
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov ebp, ebx
cmp byte [ebx], 0
je 0x401b66
inc ebp
cmp byte [ebp], 0
jne 0x401b58
inc ebp
cmp byte [ebp], 0
jne 0x401b58
sub ebp, ebx
inc ebp
push ebp
call fcn.00402420
mov dword [esp + 0x14], eax
add esp, 4
test eax, eax
jne 0x401b8b
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov edi, dword [esp + 0x10]
mov esi, ebx
mov ecx, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [esp + 0x10]
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
Function at 0x4021d0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1a8
xor ecx, ecx
mov eax, 0x404370
push ebx
mov edx, dword [esp + 0x1b0]
push esi
push edi
push ebp
cmp dword [eax], edx
je 0x4021f7
add eax, 8
inc ecx
cmp eax, 0x404400
jb 0x4021e8
cmp dword [ecx*8 + 0x404370], edx
lea ebx, [ecx*8]
jne 0x4023bb
cmp dword [0x40404c], 1
je 0x402377
cmp dword [0x40404c], 0
jne 0x40222e
cmp dword [0x404050], 1
je 0x402377
cmp edx, 0xfc
je 0x4023bb
lea eax, [esp + 0xb4]
push 0x104
push eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
call ebp
test eax, eax
jne 0x40226b
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
mov ecx, 5
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea ebp, [esp + 0xb4]
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x4022af
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
push 3
repne scasb al, byte es:[edi]
not ecx
lea ebp, [esp + ecx + 0x7c]
push 0x4032e0
push ebp
call fcn.00402cd0
add esp, 0xc
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edi, ebp
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4032c0
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebx + 0x404374]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
lea edi, [esp + 0x14]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x12010
and ecx, 3
push str.Microsoft_Visual_C_Runtime_Library
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x1c]
push eax
call fcn.00402c30
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
cmp dword [0x404f90], 0
je 0x40238d
mov eax, dword [0x404f90]
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x402397
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebx + 0x404374]
push 0
lea eax, [esp + 0x14]
mov edi, edx
push eax
mov ecx, 0xffffffff
sub 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 ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret