joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402340
Capabilities:
Get session user name

Disassembly:
sub esp, 0x1e4
mov eax, dword [0x412008]
xor eax, esp
mov dword [esp + 0x1dc], eax
push 0x94
lea eax, [esp + 0x18]
push 0
push eax
mov dword [esp + 0x1c], 0
call fcn.00406b00
mov ecx, dword [str.___x9:7__9_3x59_]
mov edx, dword [ecx + 0x19c]
add esp, 0xc
mov dword [esp + 0x14], edx
call fcn.00401000
mov dword [esp + 0x10], eax
call fcn.00402ab0
movzx eax, al
push 0
mov dword [esp + 0x1c], eax
call fcn.00404542
sub esp, 0xfffffffc
add eax, 0x7080
lea ecx, [esp + 8]
adc edx, 0
push ecx
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edx
call fcn.004039eb
mov edx, dword [eax + 0x14]
mov dword [esp + 0x20], edx
mov ecx, dword [eax + 0x10]
inc ecx
mov dword [esp + 0x24], ecx
mov edx, dword [eax + 0xc]
mov dword [esp + 0x28], edx
mov ecx, dword [eax + 8]
mov dword [esp + 0x2c], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x30], edx
mov eax, dword [eax]
sub esp, 0xfffffffc
mov dword [esp + 0x30], eax
call dword [sym.imp.SHELL32.dll_IsUserAnAdmin]
test eax, eax
je 0x4023f7
mov eax, 1
jmp 0x402423
call fcn.00401000
cmp eax, 4
jge 0x402408
mov eax, 3
jmp 0x402423
call fcn.004031d0
cmp eax, 1
jne 0x402419
mov eax, 2
jmp 0x402423
neg eax
sbb eax, eax
and eax, 0xfffffffd
add eax, 3
push 0x12b
lea ecx, [esp + 0xad]
push 0
push ecx
mov dword [esp + 0x40], eax
mov byte [esp + 0xb4], 0
call fcn.00406b00
add esp, 0xc
lea edx, [esp + 4]
push edx
lea eax, [esp + 0xac]
push eax
mov dword [esp + 0xc], 0x12c
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
jne 0x402477
push 0x64
push eax
lea ecx, [esp + 0x40]
push ecx
call fcn.00406b00
add esp, 0xc
jmp 0x402493
lea edx, [esp + 0xa8]
push edx
lea eax, [esp + 0x3c]
mov byte [esp + 0xd4], 0
call fcn.00401780
sub esp, 0xfffffffc
mov eax, dword [0x413190]
mov ecx, dword [0x413194]
mov edx, dword [0x413198]
push 0
mov dword [esp + 0xa0], eax
lea eax, [esp + 0x14]
mov dword [esp + 0xa4], ecx
push 0x98
push eax
mov ecx, 0x414774
mov dword [esp + 0xb0], edx
call fcn.004018e0
mov ecx, dword [esp + 0x1e8]
add esp, 0xc
xor ecx, esp
call fcn.004033e4
sub esp, 0xfffffe1c
ret
Function at 0x402ab0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x412008]
and esp, 0xfffffff8
sub esp, 0x254
xor eax, esp
mov dword [esp + 0x250], eax
push ebx
xor ebx, ebx
push 0x103
lea eax, [esp + 0x14d]
push ebx
push eax
mov byte [esp + 0x154], bl
call fcn.00406b00
sub esp, 0xfffffff4
push 0x104
lea ecx, [esp + 0x14c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov byte [esp + 0x14b], bl
lea eax, [esp + 0x148]
dec eax
lea esp, [esp]
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x402b10
mov ecx, dword [0x4105c0]
mov edx, dword [str.Program_Files__x86_]
mov dword [eax], edx
mov edx, dword [0x4105c4]
mov dword [eax + 4], ecx
mov ecx, dword [0x4105c8]
mov dword [eax + 8], edx
mov edx, dword [0x4105cc]
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], edx
lea eax, [esp + 8]
push eax
lea ecx, [esp + 0x14c]
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x402b65
test byte [esp + 8], 0x10
je 0x402b65
mov bl, 1
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov al, bl
mov ecx, dword [esp + 0x254]
pop ebx
xor ecx, esp
call fcn.004033e4
mov esp, ebp
pop ebp
ret
Function at 0x4031d0
Capabilities:
Compare security identifiers

Disassembly:
mov eax, dword [0x412008]
add esp, 0xffffffe0
xor eax, esp
mov dword [esp + 0x1c], eax
push esi
push ebx
push ebp
push edi
xor ebp, ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebp
mov byte [esp + 0x24], 0
mov byte [esp + 0x25], 0
mov byte [esp + 0x26], 0
mov byte [esp + 0x27], 0
mov byte [esp + 0x28], 0
mov byte [esp + 0x29], 5
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push ebp
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
mov dword [esp + 0x14], esi
cmp esi, ebp
je 0x4032f3
or edi, 0xffffffff
cmp esi, edi
je 0x4032f3
lea eax, [esp + 0x18]
push eax
push 0xf01ff
push esi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x40325c
mov dword [esp + 0x10], edi
jmp 0x4032fb
lea ecx, [esp + 0x1c]
push ecx
push ebp
push ebp
push ebp
push ebp
push ebp
push ebp
push 0x220
push 0x20
push 2
lea edx, [esp + 0x4c]
push edx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
or eax, eax
jne 0x403285
mov dword [esp + 0x10], edi
jmp 0x4032fb
push 0x400
call fcn.00403aef
push 0x400
push ebp
mov edi, eax
push edi
call fcn.00406b00
mov ecx, dword [esp + 0x28]
sub esp, 0xfffffff0
lea eax, [esp + 0x20]
push eax
push 0x400
push edi
push 2
push ecx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov ebx, dword [edi]
cmp ebx, ebp
jle 0x4032ff
lea esi, [edi + 4]
mov eax, dword [esp + 0x1c]
mov edx, dword [esi]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_EqualSid]
or eax, eax
jne 0x4032e3
inc ebp
sub esi, 0xfffffff8
cmp ebp, ebx
jl 0x4032c1
mov esi, dword [esp + 0x14]
xor ebp, ebp
jmp 0x4032ff
xor ebp, ebp
mov esi, dword [esp + 0x14]
mov dword [esp + 0x10], 1
jmp 0x4032ff
mov dword [esp + 0x10], 0xffffffff
mov edi, dword [esp + 0x14]
cmp edi, ebp
je 0x40330c
push edi
call fcn.00403a12
add esp, 4
mov eax, dword [esp + 0x1c]
cmp eax, ebp
je 0x40331b
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, ebp
je 0x40332d
cmp esi, 0xffffffff
je 0x40332d
push esi
call edi
mov eax, dword [esp + 0x18]
cmp eax, ebp
je 0x40333d
cmp eax, 0xffffffff
je 0x40333d
push eax
call edi
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x2c]
pop edi
pop ebp
pop ebx
pop esi
xor ecx, esp
call fcn.004033e4
add esp, 0x20
ret
Function at 0x403360
Capabilities:
Create process on windows
Self delete
Terminate process

Disassembly:
add esp, 0xfffffeec
mov eax, dword [0x412008]
xor eax, esp
mov dword [esp + 0x110], eax
push 0x100
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_SetPriorityClass]
push 0xf
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov eax, dword [0x413a20]
push 0
push eax
push 1
push 4
call dword [sym.imp.SHELL32.dll_SHChangeNotify]
mov ecx, dword [0x413a20]
push ecx
lea edx, [esp + 4]
push str._c_ping_127.0.0.1__del__q___s_
push edx
call fcn.004033f3
sub esp, 0xfffffff4
push 0
push 0
lea eax, [esp + 8]
push eax
push str.cmd.exe
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x4033e4
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x412008]
jne 0x4033ee
repz ret
jmp 0x404744
mov edi, edi
push ebp
mov dword [0x413b48], eax
mov dword [0x413b44], ecx
mov ebp, esp
mov dword [0x413b40], edx
mov dword [0x413b3c], ebx
add esp, 0xfffffcd8
mov dword [0x413b38], esi
mov dword [0x413b34], edi
mov word [0x413b60], ss
mov word [0x413b54], cs
mov word [0x413b30], ds
mov word [0x413b2c], es
mov word [0x413b28], fs
mov word [0x413b24], gs
pushfd
pop dword [0x413b58]
mov eax, dword [ebp]
mov dword [0x413b4c], eax
mov eax, dword [ebp + 4]
mov dword [0x413b50], eax
lea eax, [ebp + 8]
mov dword [0x413b5c], eax
mov edi, dword [ebp - 0x320]
mov dword [0x413a98], 0x10001
mov eax, dword [0x413b50]
mov dword [0x413a4c], eax
mov dword [0x413a40], 0xc0000409
mov dword [0x413a44], 1
mov eax, dword [0x412008]
mov dword [ebp - 0x328], eax
mov eax, dword [0x41200c]
mov dword [ebp - 0x324], eax
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov dword [0x413a90], eax
push 1
call fcn.00409fa7
pop ecx
push 0
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
push 0x40f254
call dword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
cmp dword [0x413a90], 0
jne 0x404836
push 1
call fcn.00409fa7
pop ecx
push 0xc0000409
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
leave
ret
Function at 0x403c94
Capabilities:
Read file on windows

Disassembly:
push ebp
mov edi, edi
mov ebp, esp
mov ecx, dword [ebp + 8]
sub esp, 0x10
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 8], ecx
xor edi, edi
mov dword [ebp - 4], ebx
cmp dword [ebp + 0x10], edi
je 0x403cd3
cmp dword [ebp + 0x14], edi
je 0x403cd3
cmp ecx, edi
jne 0x403cda
call fcn.00405812
push edi
push edi
push edi
push edi
mov dword [eax], 0x16
push edi
call fcn.004057aa
sub esp, 0xffffffec
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov esi, dword [ebp + 0x18]
cmp esi, edi
je 0x403cee
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
jbe 0x403d0f
cmp ebx, 0xffffffff
je 0x403cfe
push ebx
push edi
push ecx
call fcn.00406b00
add esp, 0xc
cmp esi, edi
je 0x403cbb
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
ja 0x403cbb
mov edi, dword [ebp + 0x10]
imul edi, dword [ebp + 0x14]
mov ebx, edi
test dword [esi + 0xc], 0x10c
mov dword [ebp - 0x10], edi
je 0x403d2c
mov eax, dword [esi + 0x18]
mov dword [ebp - 0xc], eax
jmp 0x403d33
mov dword [ebp - 0xc], 0x1000
or edi, edi
je 0x403e25
test dword [esi + 0xc], 0x10c
je 0x403d88
mov eax, dword [esi + 4]
or eax, eax
je 0x403d88
jl 0x403e86
cmp ebx, eax
mov edi, ebx
jb 0x403d59
mov edi, eax
cmp edi, dword [ebp - 4]
ja 0x403e2d
push edi
push dword [esi]
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.004086bb
sub dword [esi + 4], edi
add dword [esi], edi
add dword [ebp - 8], edi
sub ebx, edi
add esp, 0x10
sub dword [ebp - 4], edi
mov edi, dword [ebp - 0x10]
jmp 0x403e1d
cmp ebx, dword [ebp - 0xc]
jb 0x403df5
cmp dword [ebp - 0xc], 0
je 0x403db2
xor edx, edx
mov ecx, 0x7fffffff
cmp ebx, ecx
jbe 0x403da7
mov eax, ecx
div dword [ebp - 0xc]
mov eax, ecx
jmp 0x403dae
mov eax, ebx
div dword [ebp - 0xc]
mov eax, ebx
sub eax, edx
jmp 0x403dbd
mov eax, 0x7fffffff
cmp ebx, eax
ja 0x403dbd
mov eax, ebx
cmp eax, dword [ebp - 4]
ja 0x403e59
push eax
push dword [ebp - 8]
push esi
call fcn.00408689
pop ecx
push eax
call fcn.0040858c
add esp, 0xc
test eax, eax
je 0x403e98
cmp eax, 0xffffffff
je 0x403e86
add dword [ebp - 8], eax
sub ebx, eax
sub dword [ebp - 4], eax
jmp 0x403e1d
push esi
call fcn.00407e9f
pop ecx
cmp eax, 0xffffffff
je 0x403e8a
cmp dword [ebp - 4], 0
je 0x403e59
mov ecx, dword [ebp - 8]
inc dword [ebp - 8]
dec ebx
mov byte [ecx], al
mov eax, dword [esi + 0x18]
dec dword [ebp - 4]
mov dword [ebp - 0xc], eax
test ebx, ebx
jne 0x403d3b
mov eax, dword [ebp + 0x14]
jmp 0x403cd5
xor esi, esi
cmp dword [ebp + 0xc], 0xffffffff
je 0x403e44
push dword [ebp + 0xc]
push esi
push dword [ebp + 8]
call fcn.00406b00
add esp, 0xc
call fcn.00405812
push esi
push esi
push esi
push esi
mov dword [eax], 0x22
push esi
jmp 0x403ccb
cmp dword [ebp + 0xc], 0xffffffff
je 0x403e6f
push dword [ebp + 0xc]
push 0
push dword [ebp + 8]
call fcn.00406b00
sub esp, 0xfffffff4
call fcn.00405812
mov dword [eax], 0x22
xor eax, eax
push eax
push eax
push eax
push eax
push eax
jmp 0x403ccb
or dword [esi + 0xc], 0x20
mov eax, edi
sub eax, ebx
xor edx, edx
div dword [ebp + 0x10]
jmp 0x403cd5
or dword [esi + 0xc], 0x10
jmp 0x403e8a
Function at 0x404744
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x412008]
jne 0x4033ee
repz ret
jmp 0x404744
mov edi, edi
push ebp
mov dword [0x413b48], eax
mov dword [0x413b44], ecx
mov ebp, esp
mov dword [0x413b40], edx
mov dword [0x413b3c], ebx
add esp, 0xfffffcd8
mov dword [0x413b38], esi
mov dword [0x413b34], edi
mov word [0x413b60], ss
mov word [0x413b54], cs
mov word [0x413b30], ds
mov word [0x413b2c], es
mov word [0x413b28], fs
mov word [0x413b24], gs
pushfd
pop dword [0x413b58]
mov eax, dword [ebp]
mov dword [0x413b4c], eax
mov eax, dword [ebp + 4]
mov dword [0x413b50], eax
lea eax, [ebp + 8]
mov dword [0x413b5c], eax
mov edi, dword [ebp - 0x320]
mov dword [0x413a98], 0x10001
mov eax, dword [0x413b50]
mov dword [0x413a4c], eax
mov dword [0x413a40], 0xc0000409
mov dword [0x413a44], 1
mov eax, dword [0x412008]
mov dword [ebp - 0x328], eax
mov eax, dword [0x41200c]
mov dword [ebp - 0x324], eax
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov dword [0x413a90], eax
push 1
call fcn.00409fa7
pop ecx
push 0
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
push 0x40f254
call dword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
cmp dword [0x413a90], 0
jne 0x404836
push 1
call fcn.00409fa7
pop ecx
push 0xc0000409
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
leave
ret

Function at 0x405682
Capabilities:
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
add esp, 0xfffffcd8
mov eax, dword [0x412008]
xor eax, ebp
mov dword [ebp - 4], eax
and dword [ebp - 0x328], 0
push ebx
push 0x4c
lea eax, [ebp - 0x324]
push 0
push eax
call fcn.00406b00
lea eax, [ebp - 0x328]
mov dword [ebp - 0x2d8], eax
lea eax, [ebp - 0x2d0]
add esp, 0xc
mov dword [ebp - 0x2d4], eax
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x224], ecx
mov dword [ebp - 0x228], edx
mov dword [ebp - 0x22c], ebx
mov dword [ebp - 0x230], esi
mov dword [ebp - 0x234], edi
mov word [ebp - 0x208], ss
mov word [ebp - 0x214], cs
mov word [ebp - 0x238], ds
mov word [ebp - 0x23c], es
mov word [ebp - 0x240], fs
mov word [ebp - 0x244], gs
pushfd
pop dword [ebp - 0x210]
mov eax, dword [ebp + 4]
lea ecx, [ebp + 4]
mov dword [ebp - 0x2d0], 0x10001
mov dword [ebp - 0x218], eax
mov dword [ebp - 0x20c], ecx
mov ecx, dword [ecx - 4]
mov dword [ebp - 0x21c], ecx
mov dword [ebp - 0x328], 0xc0000417
mov dword [ebp - 0x324], 1
mov dword [ebp - 0x31c], eax
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
push 0
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea eax, [ebp - 0x2d8]
push eax
call dword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
or eax, eax
jne 0x40578b
test ebx, ebx
jne 0x40578b
push 2
call fcn.00409fa7
pop ecx
push 0xc0000417
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004033e4
leave
ret
Function at 0x4057aa
Capabilities:
Terminate process

Disassembly:
push ebp
mov edi, edi
mov ebp, esp
push dword [0x413d64]
call fcn.004058d6
or eax, eax
pop ecx
je 0x4057c2
pop esi
jmp eax
push 2
call fcn.00409fa7
pop ecx
pop ebp
jmp fcn.00405682

Function at 0x405c6b
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
mov esi, esi
push edi
push esi
mov esi, str.KERNEL32.DLL
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
jne 0x405c86
push esi
call fcn.00403470
pop ecx
mov edi, eax
test edi, edi
je 0x405dee
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.FlsAlloc
push edi
call esi
push str.FlsGetValue
push edi
mov dword [0x413d68], eax
call esi
push str.FlsSetValue
push edi
mov dword [0x413d6c], eax
call esi
push str.FlsFree
push edi
mov dword [0x413d70], eax
call esi
cmp dword [0x413d68], 0
mov esi, dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [0x413d74], eax
je 0x405cef
cmp dword [0x413d6c], 0
je 0x405cef
cmp dword [0x413d70], 0
je 0x405cef
or eax, eax
jne 0x405d13
mov eax, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [0x413d6c], eax
mov eax, dword [sym.imp.KERNEL32.dll_TlsFree]
mov dword [0x413d68], 0x405948
mov dword [0x413d70], esi
mov dword [0x413d74], eax
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x41218c], eax
cmp eax, 0xffffffff
je 0x405df3
push dword [0x413d6c]
push eax
call esi
test eax, eax
je 0x405df3
call fcn.0040375a
push dword [0x413d68]
call fcn.0040585b
push dword [0x413d6c]
mov dword [0x413d68], eax
call fcn.0040585b
push dword [0x413d70]
mov dword [0x413d6c], eax
call fcn.0040585b
push dword [0x413d74]
mov dword [0x413d70], eax
call fcn.0040585b
add esp, 0x10
mov dword [0x413d74], eax
call fcn.00405fdc
test eax, eax
je 0x405dee
push 0x405b3c
push dword [0x413d68]
call fcn.004058d6
pop ecx
call eax
mov dword [0x412188], eax
cmp eax, 0xffffffff
je 0x405dee
push 0x214
push 1
call fcn.0040ac47
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x405dee
push edi
push dword [0x412188]
push dword [0x413d70]
call fcn.004058d6
pop ecx
call eax
test eax, eax
je 0x405dee
push 0
push edi
call fcn.004059c2
pop ecx
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
or dword [edi + 4], 0xffffffff
mov dword [edi], eax
xor eax, eax
inc eax
jmp 0x405df5
call fcn.00405985
xor eax, eax
pop esi
pop edi
ret
Function at 0x405df8
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov edi, edi
push ecx
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
push edi
xor edi, edi
mov dword [ebp - 4], edi
cmp ebx, dword [edi*8 + 0x412190]
je 0x405e1e
inc edi
cmp edi, 0x17
mov dword [ebp - 4], edi
jb 0x405e0c
cmp edi, 0x17
jae 0x405f9e
push 3
call fcn.0040b2ef
cmp eax, 1
pop ecx
je 0x405f6c
push 3
call fcn.0040b2ef
pop ecx
or eax, eax
jne 0x405e51
cmp dword [0x412004], 1
je 0x405f6c
cmp ebx, 0xfc
je 0x405f9e
mov edi, 0x413d78
mov ebx, 0x314
push str.Runtime_Error__n_nProgram:
push ebx
push edi
call fcn.0040b287
sub esp, 0xfffffff4
test eax, eax
je 0x405e87
push esi
push esi
push esi
push esi
push esi
call fcn.00405682
add esp, 0x14
mov esi, 0x413d91
push 0x104
push esi
push 0
mov byte [0x413e95], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x405ecb
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.0040b287
add esp, 0xc
or eax, eax
je 0x405ecb
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.00405682
add esp, 0x14
push esi
call fcn.0040ad00
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x405f10
push esi
call fcn.0040ad00
mov ecx, 0x41408c
sub esi, 0x3b
add eax, esi
push 3
sub ecx, eax
push 0x40f8c4
push ecx
push eax
call fcn.0040b1d2
sub esp, 0xffffffec
test eax, eax
je 0x405f10
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.00405682
add esp, 0x14
jmp 0x405f12
xor esi, esi
push 0x40f8c0
push ebx
push edi
call fcn.0040b15e
sub esp, 0xfffffff4
test eax, eax
je 0x405f32
push esi
push esi
push esi
push esi
push esi
call fcn.00405682
add esp, 0x14
mov eax, dword [ebp - 4]
push dword [eax*8 + 0x412194]
push ebx
push edi
call fcn.0040b15e
add esp, 0xc
test eax, eax
je 0x405f57
push esi
push esi
push esi
push esi
push esi
call fcn.00405682
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push edi
call fcn.0040aff5
sub esp, 0xfffffff4
jmp 0x405f9e
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebx, eax
cmp ebx, esi
je 0x405f9e
cmp ebx, 0xffffffff
je 0x405f9e
push 0
lea esi, [edi*8 + 0x412194]
lea eax, [ebp - 8]
push eax
push dword [esi]
call fcn.0040ad00
pop ecx
push eax
push dword [esi]
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x406340
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov edx, esp
mov eax, dword [edx + 8]
mov edx, 0x5a4d
cmp word [eax], dx
je 0x406356
xor eax, eax
pop ebp
ret
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x406352
xor edx, edx
mov eax, 0x10b
cmp word [ecx + 0x18], ax
sete dl
mov eax, edx
pop ebp
ret
Function at 0x406380
Capabilities:
Enumerate pe sections

Disassembly:
push edi
mov edx, esp
mov ebp, ebp
mov ecx, dword [edx + 8]
mov edi, dword [ecx + 0x3c]
add edi, ecx
movzx eax, word [edi + 0x14]
push esi
lea eax, [eax + edi + 0x18]
xor esi, esi
push ebx
movzx ebx, word [edi + 6]
or ebx, ebx
push ebp
jbe 0x4063bd
mov edi, dword [edx + 0xc]
mov ecx, dword [eax + 0xc]
cmp edi, ecx
jb 0x4063b5
mov edx, dword [eax + 8]
add edx, ecx
cmp edi, edx
jb 0x4063bf
inc esi
sub eax, 0xffffffd8
cmp esi, ebx
jb 0x4063a5
xor eax, eax
pop ebp
pop ebx
pop esi
pop edi
ret

Function at 0x407e9f
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
xor ebp, ebp
cmp esi, ebp
jne 0x407ecc
call fcn.00405812
push ebp
push ebp
push ebp
push ebp
push ebp
mov dword [eax], 0x16
call fcn.004057aa
sub esp, 0xffffffec
jmp 0x407fc3
mov eax, dword [esi + 0xc]
test al, 0x83
je 0x407fc3
test al, 0x40
jne 0x407fc3
test al, 2
je 0x407eee
or eax, 0x20
mov dword [esi + 0xc], eax
jmp 0x407fc3
or eax, 1
mov dword [esi + 0xc], eax
test eax, 0x10c
jne 0x407f04
push esi
call fcn.0040a14d
pop ecx
jmp 0x407f09
mov eax, dword [esi + 8]
mov dword [esi], eax
push dword [esi + 0x18]
push dword [esi + 8]
push esi
call fcn.00408689
pop ecx
push eax
call fcn.0040858c
sub esp, 0xfffffff4
mov dword [esi + 4], eax
cmp eax, ebp
je 0x407fb3
cmp eax, 0xffffffff
je 0x407fb3
test byte [esi + 0xc], 0x82
jne 0x407f88
push esi
call fcn.00408689
pop ecx
cmp eax, 0xffffffff
je 0x407f73
push esi
call fcn.00408689
pop ecx
cmp eax, 0xfffffffe
je 0x407f73
push esi
call fcn.00408689
sar eax, 5
push esi
lea edi, [eax*4 + 0x414820]
call fcn.00408689
and eax, 0x1f
pop ebp
shl eax, 6
add eax, dword [edi]
pop edi
jmp 0x407f78
mov eax, 0x4127a0
mov al, byte [eax + 4]
and al, 0x82
cmp al, 0x82
jne 0x407f88
or dword [esi + 0xc], 0x2000
cmp dword [esi + 0x18], 0x200
jne 0x407fa6
mov eax, dword [esi + 0xc]
test al, 8
je 0x407fa6
test eax, 0x400
jne 0x407fa6
mov dword [esi + 0x18], 0x1000
mov ecx, dword [esi]
dec dword [esi + 4]
movzx eax, byte [ecx]
inc ecx
mov dword [esi], ecx
jmp 0x407fc6
neg eax
sbb eax, eax
and eax, 0x10
add eax, 0x10
or dword [esi + 0xc], eax
mov dword [esi + 4], ebp
or eax, 0xffffffff
pop edi
pop esi
pop ebp
ret
Function at 0x409dda
Capabilities:
Query environment variable

Disassembly:
push ebp
mov edi, edi
mov ebp, esp
mov eax, dword [0x414328]
add esp, 0xfffffff4
push ebx
xor ebx, ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
push edi
xor edi, edi
cmp eax, ebx
jne 0x409e26
call esi
mov edi, eax
cmp edi, ebx
je 0x409e0c
mov dword [0x414328], 1
jmp 0x409e2f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x409e21
push 2
pop eax
mov dword [0x414328], eax
jmp 0x409e26
mov eax, dword [0x414328]
cmp eax, 1
jne 0x409eb0
cmp edi, ebx
jne 0x409e42
call esi
mov edi, eax
cmp edi, ebx
jne 0x409e42
xor eax, eax
jmp 0x409f0c
cmp word [edi], bx
mov eax, edi
je 0x409e57
inc eax
inc eax
cmp word [eax], bx
jne 0x409e49
inc eax
inc eax
cmp word [eax], bx
jne 0x409e49
sub eax, edi
sar eax, 1
inc eax
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebx
push ebx
push ebx
push ebx
push eax
push edi
push ebx
push ebx
mov dword [ebp - 0xc], eax
call esi
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x409ea5
push eax
call fcn.0040ac02
pop ecx
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x409ea5
push ebx
push ebx
push dword [ebp - 8]
push eax
push dword [ebp - 0xc]
push edi
push ebx
push ebx
call esi
test eax, eax
jne 0x409ea2
push dword [ebp - 4]
call fcn.00403a12
pop ecx
mov dword [ebp - 4], ebx
mov ebx, dword [ebp - 4]
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
jmp 0x409f0c
cmp eax, 2
je 0x409eb9
cmp eax, ebx
jne 0x409e3b
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov esi, eax
cmp esi, ebx
je 0x409e3b
cmp byte [esi], bl
je 0x409ed7
inc eax
cmp byte [eax], bl
jne 0x409ecd
inc eax
cmp byte [eax], bl
jne 0x409ecd
sub eax, esi
inc eax
push eax
mov dword [ebp - 8], eax
call fcn.0040ac02
mov edi, eax
cmp edi, ebx
pop ecx
jne 0x409ef6
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
jmp 0x409e3b
push dword [ebp - 8]
push esi
push edi
call fcn.004090e0
sub esp, 0xfffffff4
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret