joyce8/EMBER2024-capa huggingface dataset:
Function at 0x406ba0
Capabilities:
Create process on windows

Disassembly:
mov cl, byte [esp + 4]
sub esp, 0x3c
test cl, 2
mov eax, 0xa
je 0x406bb6
mov eax, 2
cmp byte [esi], 0
je 0x406c1c
push edi
xor eax, eax
mov ecx, 0xf
lea edi, [esp + 4]
rep stosd dword es:[edi], eax
mov eax, dword [0x41e4f0]
mov ecx, dword [eax + 0x34]
mov dword [esp + 0x14], edx
lea edx, [esp + 4]
push edx
mov dword [esp + 8], 0x3c
mov dword [esp + 0xc], 0xc
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], esi
mov dword [esp + 0x24], 1
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
test eax, eax
pop edi
jne 0x406c7b
push 0x41b44c
lea eax, [esp + 0x44]
push eax
mov dword [esp + 0x48], 0xe
call fcn.00418af8
test cl, 0x10
push eax
je 0x406c39
push 0x41b02d
push 0x41b02d
push edx
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
jmp 0x406c5f
test cl, 0x20
je 0x406c58
push 0x41b02d
push 0x41b02d
push edx
push str.print
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
jmp 0x406c5f
push edx
call dword [sym.imp.KERNEL32.dll_WinExec]
cmp eax, 0x20
jge 0x406c7b
push 0x41b44c
lea ecx, [esp + 0x44]
push ecx
mov dword [esp + 0x48], 0xe
call fcn.00418af8
add esp, 0x3c
ret

Function at 0x40a5c0
Capabilities:
Log keystrokes

Disassembly:
push ecx
push esi
push edi
mov esi, eax
push esi
call dword [sym.imp.USER32.dll_TranslateMessage]
push esi
call dword [sym.imp.USER32.dll_DispatchMessageA]
mov eax, dword [0x41e530]
test byte [eax + 0x30c], 2
je 0x40a64f
mov edx, dword [esi + 4]
cmp edx, 0x200
mov edi, dword [0x41e528]
jne 0x40a630
test edi, edi
movzx eax, word [esi + 0xc]
movzx ecx, word [esi + 0xe]
jne 0x40a625
cmp dword [0x41e520], eax
jne 0x40a60e
cmp dword [0x41e524], ecx
je 0x40a630
push 0x41b44c
lea ecx, [esp + 0xc]
push ecx
mov dword [esp + 0x10], 0
call fcn.00418af8
mov dword [0x41e520], eax
mov dword [0x41e524], ecx
cmp edx, 0x100
jne 0x40a64f
test edi, edi
jne 0x40a64f
push 0x41b44c
lea edx, [esp + 0xc]
push edx
mov dword [esp + 0x10], edi
call fcn.00418af8
cmp dword [esi + 4], 0x100
jne 0x40a690
cmp dword [esi + 8], 9
jne 0x40a663
call fcn.00409140
mov eax, dword [0x41e34c]
mov ecx, dword [eax + 0x18]
cmp word [ecx + 0x30], 2
jne 0x40a690
mov eax, dword [esi + 8]
push eax
push 2
push eax
call dword [sym.imp.USER32.dll_MapVirtualKeyA]
mov esi, dword [esi + 0xc]
push eax
mov eax, 2
call fcn.00405920
add esp, 8
pop edi
pop esi
pop ecx
ret
Function at 0x40b360
Capabilities:
Enumerate pe sections

Disassembly:
mov eax, dword [0x41e540]
push ebp
mov ebp, dword [esp + 8]
push edi
mov edi, ebp
imul edi, edi, 0x8c
add edi, eax
test ebx, ebx
jl 0x40b3dd
mov ecx, dword [esp + 0x10]
test ecx, ecx
jl 0x40b3dd
mov ecx, dword [esp + 0x14]
test ecx, ecx
jl 0x40b3dd
mov ecx, dword [esp + 0x18]
test ecx, ecx
jl 0x40b3dd
movsx ecx, word [esi]
imul ecx, ecx, 0x8c
push esi
call dword [ecx + eax + 0x34]
mov ecx, dword [esp + 0x14]
xor eax, eax
mov word [esi], bp
mov dword [esi + 4], 1
mov dword [esi + 0x28], eax
mov word [esi + 0x26], ax
mov dx, word [edi + 6]
mov word [esi + 0x24], dx
mov edx, dword [esp + 0x18]
mov dword [esi + 0xc], ecx
mov ecx, dword [esp + 0x1c]
push eax
push esi
mov dword [esi + 8], ebx
mov dword [esi + 0x10], edx
mov dword [esi + 0x14], ecx
call dword [edi + 0x30]
add esp, 0xc
pop edi
pop ebp
ret
push 0x41b44c
lea edx, [esp + 0x10]
push edx
mov dword [esp + 0x14], 3
call fcn.00418af8
int3

Function at 0x410c10
Capabilities:
Enumerate files on windows

Disassembly:
sub esp, 0x140
push ebx
push ebp
push esi
mov ebx, eax
xor esi, esi
test bl, 1
push edi
je 0x410c28
mov esi, 0x10
test bl, 2
je 0x410c30
or esi, 6
lea eax, [esp + 0x10]
push eax
push ecx
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x410c52
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x140
ret
and ebx, 4
mov edx, dword [esp + 0x10]
xor eax, eax
and edx, esi
cmp eax, edx
sbb eax, eax
neg eax
test ebx, ebx
jne 0x410c70
xor ecx, ecx
test eax, eax
sete cl
mov eax, ecx
test eax, eax
je 0x410cba
mov al, byte [esp + 0x3c]
test al, al
je 0x410cba
cmp al, 0x2e
jne 0x410c94
mov al, byte [esp + 0x3d]
test al, al
je 0x410cba
cmp al, 0x2e
jne 0x410c94
mov al, byte [esp + 0x3e]
test al, al
je 0x410cba
mov eax, dword [esp + 0x154]
lea edx, [esp + 0x3c]
push edx
inc ebp
call fcn.00410690
mov eax, dword [esp + 0x158]
push 0x41b29c
call fcn.00410690
add esp, 8
lea eax, [esp + 0x10]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x410c55
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x140
ret

Function at 0x411615
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
test eax, eax
je 0x411643
add al, 0x40
mov byte [ebp + 8], al
lea eax, [ebp + 8]
push eax
mov byte [ebp + 9], 0x3a
mov byte [ebp + 0xa], 0x5c
mov byte [ebp + 0xb], 0
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
test eax, eax
je 0x411648
cmp eax, 1
je 0x411648
xor eax, eax
inc eax
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x41164c
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x41d0a0]
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
mov dword [ebp - 4], eax
je 0x4116c2
push ebx
call fcn.00411615
test eax, eax
pop ecx
jne 0x411691
mov dword [0x41dadc], 0xf
mov dword [0x41dad8], 0xd
xor eax, eax
mov ecx, dword [ebp - 4]
pop ebx
call fcn.00414d89
leave
ret
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x108]
push eax
push 0x104
lea eax, [ebp + 8]
add bl, 0x40
push eax
mov byte [ebp + 8], bl
mov byte [ebp + 9], 0x3a
mov byte [ebp + 0xa], 0x2e
mov byte [ebp + 0xb], 0
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x4116d4
lea eax, [ebp - 0x108]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x411684
inc eax
cmp eax, 0x104
ja 0x411684
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jne 0x41170b
cmp eax, dword [ebp + 0x10]
jg 0x4116ef
mov eax, dword [ebp + 0x10]
push eax
call fcn.00410f41
pop ecx
mov ecx, eax
test ecx, ecx
jne 0x41171f
mov dword [0x41dad8], 0xc
jmp 0x411684
cmp eax, dword [ebp + 0x10]
jle 0x41171f
mov dword [0x41dad8], 0x22
jmp 0x411684
lea eax, [ebp - 0x108]
push eax
push ecx
call fcn.00414c60
pop ecx
pop ecx
jmp 0x411686

Function at 0x411e27
Capabilities:
Get common file path
Set current directory
Set environment variable

Disassembly:
push 0x128
push 0x41a318
call fcn.0041523c
mov eax, dword [0x41d0a0]
mov dword [ebp - 0x1c], eax
lea edi, [ebp - 0x124]
xor ebx, ebx
mov dword [ebp - 0x130], ebx
or dword [ebp - 0x12c], 0xffffffff
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x411f34
mov eax, edi
push eax
push 0x105
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov esi, eax
mov dword [ebp - 0x134], esi
cmp esi, 0x104
jle 0x411ee5
mov dword [ebp - 4], ebx
lea eax, [esi + 1]
add eax, 3
and eax, 0xfffffffc
call fcn.004153a0
mov dword [ebp - 0x18], esp
mov edi, esp
mov dword [ebp - 0x138], edi
jmp 0x411ed2
or dword [ebp - 4], 0xffffffff
cmp esi, ebx
je 0x411f34
push edi
inc esi
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov esi, eax
cmp esi, ebx
je 0x411f34
mov al, byte [edi]
cmp al, 0x5c
je 0x411ef3
cmp al, 0x2f
jne 0x411ef8
cmp al, byte [edi + 1]
je 0x411f2e
mov byte [ebp - 0x128], 0x3d
movzx eax, byte [edi]
push eax
call fcn.004150df
pop ecx
mov byte [ebp - 0x127], al
mov byte [ebp - 0x126], 0x3a
mov byte [ebp - 0x125], bl
push edi
lea eax, [ebp - 0x128]
push eax
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
je 0x411f34
mov dword [ebp - 0x12c], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00415080
pop ecx
cmp dword [ebp - 0x130], ebx
je 0x411f50
push edi
call fcn.00410e97
pop ecx
mov eax, dword [ebp - 0x12c]
lea esp, [ebp - 0x144]
mov ecx, dword [ebp - 0x1c]
call fcn.00414d89
call fcn.00415277
ret
Function at 0x4120d7
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x41a328
call fcn.0041523c
mov edi, 0x94
mov eax, edi
call fcn.004153a0
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 [0x41dae4], ecx
mov eax, dword [esi + 4]
mov dword [0x41daf0], eax
mov edx, dword [esi + 8]
mov dword [0x41daf4], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x41dae8], esi
cmp ecx, 2
je 0x412137
or esi, 0x8000
mov dword [0x41dae8], esi
shl eax, 8
add eax, edx
mov dword [0x41daec], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x412172
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x412172
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x41218a
cmp eax, 0x20b
je 0x412177
mov dword [ebp - 0x1c], esi
jmp 0x41219e
cmp dword [ecx + 0x84], 0xe
jbe 0x412172
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x412198
cmp dword [ecx + 0x74], 0xe
jbe 0x412172
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.00412c6b
pop ecx
test eax, eax
jne 0x4121ca
cmp dword [0x41daa8], 1
jne 0x4121b7
call fcn.004159bd
push 0x1c
call fcn.00415846
push 0xff
call fcn.00413e7a
pop ecx
pop ecx
call fcn.00415fbb
mov dword [ebp - 4], esi
call fcn.004148bb
test eax, eax
jge 0x4121e3
push 0x1b
call fcn.004120b2
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x41fa54], eax
call fcn.00415e99
mov dword [0x41daa0], eax
call fcn.00415df7
test eax, eax
jge 0x412209
push 8
call fcn.004120b2
pop ecx
call fcn.00415bc4
test eax, eax
jge 0x41221a
push 9
call fcn.004120b2
pop ecx
push 1
call fcn.00413eaa
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x412230
push eax
call fcn.004120b2
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00415b67
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x412251
movzx eax, word [ebp - 0x40]
jmp 0x412254
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.0040f870
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x412272
push edi
call fcn.00413fd5
call fcn.00413ff7
jmp 0x4122a4
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00415277
ret
Function at 0x413f14
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x41db24], esi
push edi
jne 0x413f34
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 [0x41db20], esi
mov byte [0x41db1c], al
jne 0x413f9a
mov ecx, dword [0x41fa28]
test ecx, ecx
je 0x413f7b
mov eax, dword [0x41fa24]
sub eax, 4
cmp eax, ecx
jmp 0x413f74
mov eax, dword [eax]
test eax, eax
je 0x413f66
call eax
mov eax, dword [0x41fa24]
sub eax, 4
cmp eax, dword [0x41fa28]
mov dword [0x41fa24], eax
jae 0x413f5e
mov eax, 0x41d028
mov esi, 0x41d030
cmp eax, esi
mov edi, eax
jae 0x413f9a
mov eax, dword [edi]
test eax, eax
je 0x413f93
call eax
add edi, 4
cmp edi, esi
jb 0x413f8b
mov eax, 0x41d034
mov esi, 0x41d03c
cmp eax, esi
mov edi, eax
jae 0x413fb9
mov eax, dword [edi]
test eax, eax
je 0x413fb2
call eax
add edi, 4
cmp edi, esi
jb 0x413faa
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x413fd3
push dword [ebp + 8]
mov dword [0x41db24], 1
call fcn.00413e7a
pop ebp
ret
Function at 0x414087
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 [0x41f900]
push edi
jae 0x41425c
mov eax, esi
sar eax, 5
lea edi, [eax*4 + 0x41f920]
mov eax, dword [edi]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x41425c
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
je 0x414132
test dl, 2
jne 0x414132
test dl, 0x48
je 0x4140fc
cmp byte [eax + 5], 0xa
je 0x4140fc
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 0x414145
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x41412d
mov dword [0x41dadc], ecx
jmp 0x414263
cmp eax, 0x6d
jne 0x414139
xor eax, eax
jmp 0x414270
push eax
call fcn.00415080
pop ecx
jmp 0x41426d
mov eax, dword [ebp - 0x10]
mov ecx, dword [edi]
add dword [ebp - 0xc], eax
test byte [ecx + esi + 4], 0x80
je 0x414257
test eax, eax
je 0x41416c
cmp byte [ebx], 0xa
jne 0x41416c
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x414175
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 0x414251
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x414241
cmp al, 0xd
je 0x4141a7
mov byte [ebx], al
inc ebx
inc dword [ebp - 8]
jmp 0x414233
dec ecx
cmp dword [ebp - 8], ecx
jae 0x4141c1
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x4141bc
add dword [ebp - 8], 2
jmp 0x414215
mov dword [ebp - 8], eax
jmp 0x41422f
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 0x4141e9
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x41422f
cmp dword [ebp - 0x10], 0
je 0x41422f
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x41420a
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x414215
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x414232
cmp ebx, dword [ebp + 0xc]
jne 0x41421a
cmp byte [ebp - 1], 0xa
jne 0x41421a
mov byte [ebx], 0xa
jmp 0x414232
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00414a66
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x414233
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x41418b
jmp 0x414251
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x414251
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 0x414270
and dword [0x41dadc], 0
mov dword [0x41dad8], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4145bd
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x41f900]
mov eax, dword [0x41d0a0]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x414783
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x41f920]
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 0x414783
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x414627
xor eax, eax
jmp 0x414797
test al, 0x20
je 0x414638
push 2
push edi
push edi
push ecx
call fcn.004168fb
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x41470d
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x414754
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x41469a
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x41468b
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 0x41466d
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 0x4146da
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x4146e6
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x414661
jmp 0x4146e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x41477e
cmp dword [ebp + 0x3a4], edi
je 0x414754
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x414746
mov dword [0x41dadc], eax
jmp 0x41478a
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 0x414738
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x4146e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x4146e8
push dword [ebp + 0x3a4]
call fcn.00415080
pop ecx
jmp 0x414794
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x41476c
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x414620
mov dword [0x41dad8], 0x1c
mov dword [0x41dadc], edi
jmp 0x414794
sub eax, dword [ebp - 0x7c]
jmp 0x414797
and dword [0x41dadc], 0
mov dword [0x41dad8], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.00414d89
add ebp, 0x39c
leave
ret
Function at 0x415157
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.004153a0
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4151f2
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 [0x41dae4]
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 0x4151f2
cmp eax, 1
je 0x415213
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 0x4151f2
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x4151bf
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x4151ee
xor eax, eax
inc eax
jmp 0x415232
cmp edi, eax
jae 0x4151f6
xor eax, eax
jmp 0x415232
cmp eax, esi
jae 0x4151fd
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 [0x41dae4]
jmp 0x415216
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 0x415846
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x41d0a0]
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 + 0x41d348]
je 0x41587b
inc eax
cmp eax, 0x13
jb 0x41586c
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x41d348]
jne 0x4159a1
mov eax, dword [0x41daa8]
cmp eax, 1
je 0x415979
cmp eax, edx
jne 0x4158ab
cmp dword [0x41d068], 1
je 0x415979
cmp ecx, 0xfc
je 0x4159a1
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 0x4158e1
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00414c60
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00414f30
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x415915
mov eax, edi
push eax
call fcn.00414f30
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x41acf0
push edi
call fcn.004114c0
add esp, 0x10
push edi
call fcn.00414f30
push dword [esi + 0x41d34c]
mov ebx, eax
call fcn.00414f30
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.004153a0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00414c60
push edi
push ebx
call fcn.00414c70
push 0x41acd0
push ebx
call fcn.00414c70
push dword [esi + 0x41d34c]
push ebx
call fcn.00414c70
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00417d03
add esp, 0x2c
jmp 0x4159a1
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x41d34c]
push dword [esi]
call fcn.00414f30
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.00414d89
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x417ada
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 0x417b08
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 0x417b0f
cmp ebx, dword [eax + 4]
jae 0x417b0f
xor eax, eax
jmp 0x417cff
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x417b20
xor eax, eax
inc eax
jmp 0x417cfe
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x417b36
cmp ecx, edx
jae 0x417c7b
cmp dword [eax + 4], 0
je 0x417b3f
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x417b27
cmp dword [ebp + 8], 0
je 0x417b61
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x417c7b
cmp eax, esi
jae 0x417c7b
mov eax, dword [0x41dc88]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x417b86
cmp dword [esi*4 + 0x41dc90], edi
je 0x417c7f
inc esi
cmp esi, eax
jl 0x417b74
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x417cfb
cmp dword [ebp - 8], 0x1000000
jne 0x417cfb
test byte [ebp - 0xc], 0xcc
je 0x417c04
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x417cfb
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x417cfb
cmp word [eax + 0x18], 0x10b
jne 0x417cfb
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x417cfb
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x417c04
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x417c04
test byte [ecx + 0x27], 0x80
jne 0x417c7b
push 1
push 0x41dcd0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x417b18
mov ecx, dword [0x41dc88]
test ecx, ecx
mov edx, ecx
jle 0x417c38
lea eax, [ecx*4 + 0x41dc8c]
cmp dword [eax], edi
je 0x417c38
dec edx
sub eax, 4
test edx, edx
jg 0x417c2c
test edx, edx
jne 0x417c69
push 0xf
pop ebx
cmp ecx, ebx
jg 0x417c45
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x417c5d
lea eax, [edx*4 + 0x41dc90]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x417c4b
cmp ecx, 0x10
jge 0x417c69
inc ecx
mov dword [0x41dc88], ecx
push 0
push 0x41dcd0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x417b18
xor eax, eax
jmp 0x417cfe
test esi, esi
jle 0x417b18
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x41dcd0
call ebx
test eax, eax
jne 0x417b18
cmp dword [esi*4 + 0x41dc90], edi
je 0x417cd5
mov eax, dword [0x41dc88]
lea esi, [eax - 1]
test esi, esi
jl 0x417cc3
cmp dword [esi*4 + 0x41dc90], edi
je 0x417cbf
dec esi
jns 0x417cb3
test esi, esi
jge 0x417cd3
cmp eax, 0x10
jge 0x417cce
inc eax
mov dword [0x41dc88], eax
lea esi, [eax - 1]
jmp 0x417cd5
je 0x417ced
xor ecx, ecx
test esi, esi
jl 0x417ced
lea eax, [ecx*4 + 0x41dc90]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x417cdb
push 0
push 0x41dcd0
call ebx
jmp 0x417b18
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret