joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402370
Capabilities:
Access the windows event log

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4113dd
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x28
mov eax, dword [0x41a014]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov dword [ebp - 0x30], ecx
push 0x415168
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov dword [ebp - 0x38], eax
xorps xmm0, xmm0
xor eax, eax
mov dword [ebp - 0x1c], 0
movups xmmword [ebp - 0x2c], xmm0
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
push 0x28
push str.Description:_A_.NET_application_failed._n
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], eax
call fcn.00405640
push 0xd
push str.Application:
lea ecx, [ebp - 0x2c]
call fcn.00405640
mov ecx, esi
lea edi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x402404
sub ecx, edi
sar ecx, 1
push ecx
push esi
mov ecx, eax
call fcn.00405640
push 1
push 0x415164
mov ecx, eax
call fcn.00405640
push 6
push str.Path:
lea ecx, [ebp - 0x2c]
call fcn.00405640
mov esi, eax
mov eax, dword [ebp - 0x30]
mov edx, eax
lea edi, [edx + 2]
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x402443
sub edx, edi
mov ecx, esi
sar edx, 1
push edx
push eax
call fcn.00405640
push 1
push 0x415164
mov ecx, eax
call fcn.00405640
push 9
push str.Message:
lea ecx, [ebp - 0x2c]
call fcn.00405640
cmp dword [0x41a4d8], 8
mov ecx, 0x41a4c4
push dword [0x41a4d4]
cmovae ecx, dword [0x41a4c4]
push ecx
mov ecx, eax
call fcn.00405640
push 1
push 0x415164
mov ecx, eax
call fcn.00405640
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
mov esi, dword [ebp - 0x38]
cmovae eax, dword [ebp - 0x2c]
push 0
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x34]
push eax
push 0
push 1
push 0
push 0x3ff
push 0
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov ecx, dword [ebp - 0x18]
cmp ecx, 8
jb 0x402517
mov edx, dword [ebp - 0x2c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40250d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40250d
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0040e053
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0040e045
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
Function at 0x405480
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x411688
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x41a014]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x1c], ecx
mov eax, dword [ecx]
push 0
push 0
mov eax, dword [eax + 4]
mov dword [ecx + eax], 0x414e3c
mov eax, dword [ecx]
mov edx, dword [eax + 4]
lea eax, [edx - 0x18]
mov dword [edx + ecx - 4], eax
mov eax, dword [ecx]
mov dword [ecx + 8], 0
mov dword [ecx + 0xc], 0
mov ebx, dword [eax + 4]
add ebx, ecx
mov ecx, ebx
mov dword [ebp - 0x10], ebx
mov dword [ebx + 0x30], 0
mov dword [ebx + 8], 0
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 0x201
mov dword [ebx + 0x18], 6
mov dword [ebx + 0x1c], 0
mov dword [ebx + 0x20], 0
mov dword [ebx + 0x24], 0
mov dword [ebx + 0x28], 0
mov dword [ebx + 0x2c], 0
call fcn.004021e0
push 8
call fcn.0040e061
add esp, 4
mov esi, eax
push 1
mov dword [ebp - 4], 2
call fcn.0040d974
mov dword [esi + 4], eax
add esp, 4
mov eax, dword [ebp + 8]
mov dword [ebx + 0x30], esi
mov dword [ebx + 0x38], eax
mov dword [ebx + 0x3c], 0
mov ebx, dword [esi + 4]
mov dword [ebp - 0x14], ebx
mov eax, dword [ebx]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4131fc]
mov ecx, ebx
call esi
lea eax, [ebp - 0x18]
mov dword [ebp - 4], 3
push eax
call fcn.00405c00
mov edi, eax
add esp, 4
mov ecx, dword [edi]
push 0x20
mov esi, dword [ecx + 0x30]
mov ecx, esi
call dword [0x4131fc]
mov ecx, edi
call esi
movzx eax, ax
mov byte [ebp - 4], 1
mov dword [ebp - 0x14], eax
mov eax, dword [ebx]
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x4131fc]
mov ecx, ebx
call esi
mov edi, eax
test edi, edi
je 0x4055ce
mov ecx, dword [edi]
push 1
mov esi, dword [ecx]
mov ecx, esi
call dword [0x4131fc]
mov ecx, edi
call esi
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
cmp dword [ecx + 0x38], 0
mov word [ecx + 0x40], ax
jne 0x4055ec
mov eax, dword [ecx + 0xc]
push 0
or eax, 4
push eax
call fcn.004021e0
mov esi, dword [ebp - 0x1c]
mov eax, dword [esi + 0x10]
lea edx, [esi + 0x10]
mov dword [ebp - 0x20], edx
mov eax, dword [eax + 4]
mov dword [edx + eax], 0x414e48
mov eax, dword [edx]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ecx + edx - 4], eax
mov eax, dword [esi]
mov eax, dword [eax + 4]
mov dword [esi + eax], 0x414e44
mov eax, dword [esi]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x20]
mov dword [ecx + esi - 4], eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x406a10
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x411875
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x41a014]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, dword [ebp + 8]
lea eax, [ebp + 0xc]
push eax
call fcn.004064f0
lea ecx, [ebp - 0x1c]
lea esi, [eax + 1]
push esi
call fcn.00406cb0
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 0
mov edi, dword [ebp - 0x1c]
mov edx, esi
push eax
push ecx
push dword [ebp + 8]
push ecx
mov ecx, edi
call fcn.004064b0
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [ebp - 0x10], 0x41afd8
xor esi, esi
mov eax, 1
mov ebx, 0x41afd8
xchg dword [ebx], eax
test eax, eax
setne al
test al, al
je 0x406ab3
mov eax, esi
inc esi
test eax, 0x3ff
jne 0x406aa3
call sub.KERNEL32.dll_SwitchToThread
mov eax, 1
xchg dword [ebx], eax
test eax, eax
setne al
test al, al
jne 0x406a94
mov byte [ebp - 4], 1
mov eax, dword fs:[0x2c]
mov ebx, dword [eax]
mov esi, dword [ebx + 4]
test esi, esi
jne 0x406af5
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputws]
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 0xc
push eax
push 0xa
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputwc]
add esp, 8
jmp 0x406b03
push edi
mov ecx, esi
call dword [0x4131fc]
call esi
add esp, 4
cmp dword [0x41afd4], 0
je 0x406b45
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov esi, dword [0x41afdc]
add esp, 4
cmp esi, eax
jne 0x406b2a
cmp dword [ebx + 4], 0
je 0x406b45
mov edx, dword [ebp + 8]
lea eax, [ebp + 0xc]
push eax
push ecx
mov ecx, esi
call fcn.00406480
push esi
push 0xa
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputwc]
add esp, 0x10
nop
mov dword [0x41afd8], 0
test edi, edi
je 0x406b86
mov ecx, dword [ebp - 0x14]
mov eax, edi
sub ecx, edi
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x406b7c
mov edi, dword [eax - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x406b7c
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edi
call fcn.0040e053
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40ab70
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, edx
push edi
mov edi, ecx
mov eax, esi
mov dword [esi + 0x10], 0
cmp dword [esi + 0x14], 8
jb 0x40ab8c
mov eax, dword [esi]
xor ecx, ecx
push ecx
push ecx
push edi
mov word [eax], cx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ebx, eax
test ebx, ebx
je 0x40abc8
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040e318
add esp, 4
push ebx
mov ebx, eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x40abf9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
je 0x40abf0
test eax, eax
jle 0x40abe1
movzx eax, ax
or eax, 0x80070000
push eax
push edi
push str.Failed_to_read_environment_variable___s___HRESULT:_0x_X
call fcn.00406ba0
add esp, 0xc
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, ebx
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ac00
sub ecx, edx
sar ecx, 1
push ecx
push ebx
mov ecx, esi
call fcn.00405820
push ebx
call fcn.0040e313
add esp, 4
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40ea57
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40ea96
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40ea96
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40ea96
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x40ea96
cmp dword [ecx + 0x74], 0xe
jbe 0x40ea96
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x4111f0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x41121d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x41121d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x401510
Capabilities:
Set registry value

Disassembly:
sub esp, 0x288
lea eax, [esp + 0x100]
push esi
push edi
push 0x200
push eax
push 0x4091e0
call dword [sym.imp.KERNEL32.dll_OpenFile]
push 0x4091e0
call fcn.004033e0
add esp, 4
test eax, eax
jne 0x4015cc
mov edi, 0x4091e0
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
push ecx
push 0x4091e0
push 1
xor edi, edi
push edi
mov ecx, dword [0x408f58]
push str.SystemDB
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
cmp dword [esp + 0x294], edi
jne 0x4015cc
push 0x100
lea edx, [esp + 0x194]
push edx
mov eax, dword [0x408f54]
mov esi, dword [sym.imp.USER32.dll_LoadStringA]
push 0x21d
push eax
call esi
push 0x100
lea ecx, [esp + 0xc]
push ecx
mov edx, dword [0x408f54]
push 0x220
push edx
call esi
cmp dword [0x408f60], edi
jne 0x4015cc
push edi
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0x198]
push ecx
push edi
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
add esp, 0x288
ret
Function at 0x4033e0
Capabilities:
Get common file path
Query or enumerate registry value

Disassembly:
sub esp, 0x294
lea eax, [esp]
push ebx
push ebp
push esi
push edi
push eax
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x20]
push edx
xor ebx, ebx
push ebx
mov eax, dword [0x408f5c]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push str.DefName
mov edi, 0x28
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], edi
push eax
call esi
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x64]
push edx
lea eax, [esp + 0x20]
push eax
push ebx
mov ecx, dword [0x408f5c]
push str.DefCompany
mov dword [esp + 0x24], edi
push ecx
call esi
mov dx, word [0x40813c]
mov word [esp + 0x20], dx
push 0x4091e0
call fcn.004031c0
add esp, 4
mov dword [esp + 0x1c], eax
push 0x100
lea eax, [esp + 0x1a8]
push eax
mov ecx, dword [0x408f54]
push 0x1fb
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
cmp byte [esp + 0x38], bl
mov al, 0x20
jne 0x40348a
mov byte [esp + 0x38], al
mov byte [esp + 0x39], bl
cmp byte [esp + 0x20], bl
jne 0x403498
mov byte [esp + 0x20], al
mov byte [esp + 0x21], bl
cmp byte [esp + 0x60], bl
jne 0x4034a6
mov byte [esp + 0x60], al
mov byte [esp + 0x61], bl
push 0x4040
mov esi, dword [esp + 0x2ac]
lea edx, [esp + 0x120]
push edx
push esi
call fcn.00403710
mov ebp, dword [sym.imp.KERNEL32.dll_OpenFile]
cmp eax, 0xffffffff
je 0x403514
lea eax, [esp + 0x88]
push eax
push ebx
push 0x408138
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push 0x200
lea ecx, [esp + 0x120]
push ecx
lea edx, [esp + 0x90]
push edx
call ebp
lea eax, [esp + 0x88]
push eax
push esi
call fcn.00403b60
add esp, 8
test eax, eax
jne 0x403514
mov dword [esp + 0x14], 1
push ebx
lea ecx, [esp + 0x64]
push ecx
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x1b4]
push ecx
push esi
call sub.msjet35.dll_Ordinal_185
mov edi, eax
cmp edi, ebx
je 0x403586
push 0x30
push 0x1fe
push 0x1ff
push ebx
call fcn.00403350
mov edx, dword [esp + 0x2c]
add esp, 0x10
push 0x4091e0
push edx
call fcn.004032a0
add esp, 8
cmp edi, ebx
jge 0x403586
cmp dword [0x408f60], ebx
jne 0x403576
push 1
push edi
call fcn.004037a0
add esp, 8
push 0x200
lea eax, [esp + 0x120]
push eax
push esi
call ebp
cmp dword [esp + 0x14], ebx
je 0x40359d
push esi
lea ecx, [esp + 0x8c]
push ecx
call fcn.00403b60
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x294
ret

Function at 0x403b60
Capabilities:
Move file

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
mov eax, 0
jne 0x403b7f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x403b92
push eax
call fcn.004042a0
add esp, 4
mov eax, 0xffffffff
ret
xor eax, eax
ret
Function at 0x403dc0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x10c
push ebx
push esi
mov ebx, dword [esp + 0x118]
push edi
test ebx, ebx
je 0x403e33
push ebx
call fcn.00403ef0
add esp, 4
test eax, eax
jne 0x403e01
xor eax, eax
pop edi
mov dword [0x408324], 0xf
mov dword [0x408320], 0xd
pop esi
pop ebx
add esp, 0x10c
ret
add bl, 0x40
lea eax, [esp + 0x10]
mov byte [esp + 0xc], bl
push eax
lea ecx, [esp + 0x18]
lea ebx, [esp + 0x10]
mov byte [esp + 0x11], 0x3a
mov byte [esp + 0x12], 0x2e
mov byte [esp + 0x13], 0
push ecx
push 0x104
push ebx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x403e43
lea eax, [esp + 0x14]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x403ee2
inc eax
cmp eax, 0x104
ja 0x403ee2
mov edx, dword [esp + 0x120]
test edx, edx
jne 0x403e94
mov ecx, dword [esp + 0x124]
cmp eax, ecx
jg 0x403e6f
mov eax, ecx
push eax
call fcn.00404420
add esp, 4
mov edx, eax
test edx, edx
jne 0x403eb3
xor eax, eax
pop edi
mov dword [0x408320], 0xc
pop esi
pop ebx
add esp, 0x10c
ret
cmp eax, dword [esp + 0x124]
jle 0x403eb3
xor eax, eax
pop edi
mov dword [0x408320], 0x22
pop esi
pop ebx
add esp, 0x10c
ret
lea edi, [esp + 0x14]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, edx
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret

Function at 0x403ef0
Capabilities:
Get disk information

Disassembly:
mov eax, dword [esp + 4]
sub esp, 4
test eax, eax
jne 0x403f04
mov eax, 1
add esp, 4
ret
mov byte [esp + 1], 0x3a
mov byte [esp + 2], 0x5c
mov byte [esp + 3], 0
add al, 0x40
mov byte [esp], al
lea eax, [esp]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
test eax, eax
je 0x403f36
cmp eax, 1
je 0x403f36
mov eax, 1
add esp, 4
ret
xor eax, eax
add esp, 4
ret

Function at 0x403f40
Capabilities:
Create directory

Disassembly:
mov eax, dword [esp + 4]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
mov eax, 0
jne 0x403f5c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x403f6f
push eax
call fcn.004042a0
add esp, 4
mov eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x403f80
Capabilities:
Delete directory

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
mov eax, 0
jne 0x403f9a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x403fad
push eax
call fcn.004042a0
add esp, 4
mov eax, 0xffffffff
ret
xor eax, eax
ret

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

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x403fd5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004042a0
add esp, 4
mov eax, 0xffffffff
ret
test al, 1
je 0x403ffa
test byte [esp + 8], 2
je 0x403ffa
mov dword [0x408320], 0xd
mov dword [0x408324], 5
mov eax, 0xffffffff
ret
xor eax, eax
ret
Function at 0x4040e0
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword fs:[0]
push ebp
mov ebp, esp
push 0xffffffffffffffff
push section..rdata
push 0x405240
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 [0x40832c], eax
xor eax, eax
mov al, byte [0x40832d]
mov dword [0x408338], eax
mov eax, dword [0x40832c]
shr dword [0x40832c], 0x10
and eax, 0xff
mov dword [0x408334], eax
shl eax, 8
add eax, dword [0x408338]
mov dword [0x408330], eax
call fcn.00405220
mov dword [ebp - 4], 0
call fcn.00405040
call fcn.00404850
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40a38c], eax
call fcn.00404ea0
mov dword [0x4081a0], eax
test eax, eax
je 0x404179
cmp dword [0x40a38c], 0
jne 0x404183
push 0xffffffffffffffff
call fcn.00404340
add esp, 4
call fcn.00404c20
call fcn.00404b40
call fcn.00404310
mov esi, dword [0x40a38c]
mov al, byte [esi]
cmp al, 0x22
je 0x4041aa
cmp al, 0x20
jbe 0x4041d7
inc esi
cmp byte [esi], 0x20
ja 0x4041a2
jmp 0x4041d7
inc esi
cmp byte [esi], 0x22
je 0x4041d6
mov bl, byte [ebp - 0x28]
mov bl, byte [esi]
test bl, bl
je 0x4041d1
xor eax, eax
mov al, bl
push eax
call fcn.00404ae0
add esp, 4
test eax, eax
je 0x4041cb
inc esi
inc esi
cmp byte [esi], 0x22
jne 0x4041b3
cmp byte [esi], 0x22
jne 0x4041d7
inc esi
cmp byte [esi], 0
je 0x4041e7
cmp byte [esi], 0x20
ja 0x4041e7
inc esi
cmp byte [esi], 0
jne 0x4041dc
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 0x40420b
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.00404340
jmp 0x40424c
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 0x404380
Capabilities:
Terminate process

Disassembly:
mov dword [0x408364], 1
cmp dword [esp + 8], 0
push ebx
push esi
mov ebx, dword [esp + 0x14]
mov byte [0x408360], bl
jne 0x4043dc
cmp dword [0x40a388], 0
je 0x4043ca
mov esi, dword [0x40a380]
sub esi, 4
cmp esi, dword [0x40a388]
jb 0x4043ca
mov eax, dword [esi]
test eax, eax
je 0x4043bf
call eax
sub esi, 4
cmp esi, dword [0x40a388]
jae 0x4043b7
push 0x40801c
push 0x408014
call fcn.00404400
add esp, 8
push 0x408024
push 0x408020
call fcn.00404400
add esp, 8
test ebx, ebx
jne 0x4043fd
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebx
ret
Function at 0x404ea0
Capabilities:
Query environment variable

Disassembly:
sub esp, 4
cmp dword [0x408620], 0
push ebx
push esi
push edi
push ebp
jne 0x404ef0
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
call esi
mov edi, eax
test edi, edi
je 0x404ece
mov dword [0x408620], 1
mov ebx, dword [esp + 0x10]
jmp 0x404efe
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
je 0x404ee6
mov dword [0x408620], 2
jmp 0x404efe
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
cmp dword [0x408620], 1
jne 0x404fad
test edi, edi
jne 0x404f21
call esi
mov edi, eax
test edi, edi
jne 0x404f21
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp word [edi], 0
mov esi, edi
je 0x404f3b
add esi, 2
cmp word [esi], 0
jne 0x404f29
add esi, 2
cmp word [esi], 0
jne 0x404f29
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 0x404f9c
push ebp
call fcn.00404420
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x404f9c
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 0x404f8b
push ebx
call fcn.004055b0
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 [0x408620], 2
jne 0x405031
test ebx, ebx
jne 0x404fd0
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
jne 0x404fd0
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov ebp, ebx
cmp byte [ebx], 0
je 0x404fe5
inc ebp
cmp byte [ebp], 0
jne 0x404fd7
inc ebp
cmp byte [ebp], 0
jne 0x404fd7
sub ebp, ebx
inc ebp
push ebp
call fcn.00404420
mov dword [esp + 0x14], eax
add esp, 4
test eax, eax
jne 0x40500a
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