joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404fa0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x41f8c0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x10], esi
xor ebx, ebx
mov dword [esp + 0x1c], ebx
lea ebp, [esi + 8]
call fcn.004192a2
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp], eax
lea edi, [esi + 0xc]
call fcn.004192a2
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [edi], eax
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x30]
mov dword [esi + 0x1c], ecx
push 0x420f60
lea ecx, [esp + 0x28]
mov byte [esp + 0x20], 1
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], eax
mov dword [esi], edx
mov dword [esi + 0x18], ebx
call fcn.00404e20
mov ebx, dword [esp + 0x24]
push 0x5c
push ebx
call fcn.00408aad
add esp, 8
test eax, eax
jne 0x405034
or eax, 0xffffffff
jmp 0x405036
sub eax, ebx
push eax
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x2c]
call fcn.004014e0
push eax
mov ecx, edi
mov byte [esp + 0x20], 2
call fcn.00401540
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov byte [esp + 0x1c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405075
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
push 0x420f60
mov ecx, edi
call fcn.00404f30
mov edi, dword [ebx - 0xc]
push 0x5c
push ebx
call fcn.00408aad
add esp, 8
test eax, eax
jne 0x405098
or eax, 0xffffffff
jmp 0x40509a
sub eax, ebx
sub edi, eax
push edi
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x2c]
call fcn.00404ec0
push eax
mov ecx, ebp
mov byte [esp + 0x20], 3
call fcn.00401540
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov byte [esp + 0x1c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4050db
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
push 0x420f60
mov ecx, ebp
call fcn.00404f30
push 0x420f60
mov ecx, ebp
call fcn.00404e20
mov ecx, esi
call fcn.00404c20
add ebx, 0xfffffff0
mov dword [esp + 0x1c], 0xffffffff
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40511c
mov ecx, dword [ebx]
mov edx, dword [ecx]
push ebx
call dword [edx + 4]
mov ecx, dword [esp + 0x14]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret 0x10
Function at 0x405140
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x41f8d8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push esi
push edi
mov esi, ecx
lea ebx, [esi + 4]
push ebx
push 0x20019
xor edi, edi
mov dword [esp + 0x1c], edi
mov eax, dword [esi + 0xc]
push edi
push eax
mov eax, dword [esi]
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405270
mov eax, dword [esi + 8]
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea ecx, [esp + 0x10]
push ecx
push edi
lea edx, [esp + 0x1c]
push edx
push edi
push eax
mov eax, dword [ebx]
push eax
mov dword [esp + 0x28], edi
call ebp
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0041866d
add esp, 4
lea edx, [esp + 0x10]
push edx
mov edx, dword [ebx]
mov edi, eax
mov eax, dword [esi + 8]
push edi
lea ecx, [esp + 0x1c]
push ecx
push 0
push eax
push edx
call ebp
test eax, eax
push edi
jne 0x405230
lea ecx, [esp + 0x1c]
call fcn.00402dc0
lea ebp, [esi + 0x10]
push eax
mov ecx, ebp
mov dword [esp + 0x28], 0
call fcn.00401540
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0x24], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40520e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
push edi
call fcn.00418668
mov eax, dword [ebx]
add esp, 4
push eax
mov dword [esi + 0x18], 1
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp]
sub eax, 0x10
push eax
jmp 0x405248
call fcn.00418668
mov edx, dword [ebx]
add esp, 4
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [esi + 0x14]
sub esi, 0x10
push esi
call fcn.00401370
add esp, 4
pop ebp
mov ecx, eax
mov eax, dword [esp + 0x28]
pop edi
add ecx, 0x10
pop esi
mov dword [eax], ecx
pop ebx
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
add esp, 0x18
ret 4
mov esi, dword [esi + 0x14]
sub esi, 0x10
push esi
call fcn.00401370
mov ecx, dword [esp + 0x1c]
add esp, 4
mov edx, eax
mov eax, dword [esp + 0x28]
pop edi
add edx, 0x10
pop esi
mov dword [eax], edx
pop ebx
mov dword fs:[0], ecx
add esp, 0x18
ret 4

Function at 0x405870
Capabilities:
Get common file path

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x10c
lea eax, [esp + 4]
push eax
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jl 0x405903
mov eax, dword [esp + 4]
lea edx, [esp + 8]
push edx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x405903
lea ecx, [esp]
push ecx
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
mov ecx, dword [esp + 4]
mov eax, dword [esp]
mov edx, dword [eax]
push ecx
push eax
call dword [edx + 0x14]
mov eax, dword [esp]
mov edx, dword [eax]
push eax
call dword [edx + 8]
lea eax, [esp + 8]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4058c8
push esi
mov esi, dword [esp + 0x118]
sub eax, edx
push eax
lea eax, [esp + 0x10]
push eax
mov ecx, esi
call fcn.00401440
push 1
push 0x420f60
mov ecx, esi
call fcn.00405690
mov eax, 1
pop esi
add esp, 0x10c
ret 8
xor eax, eax
add esp, 0x10c
ret 8
Function at 0x408481
Capabilities:
Terminate process

Disassembly:
push 8
push 0x422980
call fcn.0040a684
push 8
call fcn.0040bd1f
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x42b95c], esi
jne 0x4084b5
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x42b958], esi
mov al, byte [ebp + 0x10]
mov byte [0x42b954], al
cmp dword [ebp + 0xc], edi
jne 0x4084ff
cmp dword [0x42d1ec], edi
je 0x4084ef
mov eax, dword [0x42d1e8]
sub eax, 4
mov dword [0x42d1e8], eax
cmp eax, dword [0x42d1ec]
jb 0x4084ef
mov eax, dword [eax]
cmp eax, edi
je 0x4084d0
call eax
jmp 0x4084d0
push 0x428088
mov eax, 0x428080
call fcn.004083ff
pop ecx
push 0x428094
mov eax, 0x42808c
call fcn.004083ff
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x408530
cmp dword [ebp + 0x10], edi
jne 0x40853e
mov dword [0x42b95c], esi
push dword [ebp + 8]
call fcn.004083bd
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x40853d
push 8
call fcn.0040bc6a
pop ecx
ret
call fcn.0040a6bf
ret
Function at 0x408794
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a4]
sub esp, 0x424
mov eax, dword [0x428a58]
xor ecx, ecx
xor eax, ebp
cmp dword [ebp + 0x3b4], ecx
push edi
mov edi, dword [ebp + 0x3b0]
mov dword [ebp + 0x3a0], eax
mov dword [ebp - 0x7c], edi
mov dword [ebp - 0x74], ecx
mov dword [ebp - 0x78], ecx
jne 0x4087d0
xor eax, eax
jmp 0x40893a
mov eax, dword [ebp + 0x3ac]
push ebx
mov ebx, dword [ebp + 0x3ac]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x42cea0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x40880e
push 2
push ecx
push ecx
push dword [ebp + 0x3ac]
call fcn.0040c158
add esp, 0x10
xor ecx, ecx
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x4088a8
cmp dword [ebp + 0x3b4], ecx
mov dword [ebp - 0x70], edi
mov dword [ebp - 0x68], ecx
jbe 0x40890b
jmp 0x408832
xor ecx, ecx
mov dword [ebp - 0x6c], ecx
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp - 0x7c]
lea eax, [ebp - 0x64]
cmp ecx, dword [ebp + 0x3b4]
jae 0x40886d
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40885e
inc dword [ebp - 0x78]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x6c]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x6c]
cmp dword [ebp - 0x6c], 0x400
jl 0x40883e
mov edi, eax
lea eax, [ebp - 0x64]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x64]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4088cc
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x4088d5
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp - 0x7c]
cmp eax, dword [ebp + 0x3b4]
jb 0x408830
jmp 0x4088d5
push ecx
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b4]
push edi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4088cc
mov eax, dword [ebp - 0x80]
and dword [ebp - 0x68], 0
mov dword [ebp - 0x74], eax
jmp 0x4088d5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x74]
test eax, eax
jne 0x408935
cmp dword [ebp - 0x68], eax
je 0x408908
push 5
pop esi
cmp dword [ebp - 0x68], esi
jne 0x4088fd
call fcn.0040a3ae
mov dword [eax], 9
call fcn.0040a3b7
mov dword [eax], esi
jmp 0x408930
push dword [ebp - 0x68]
call fcn.0040a3c0
pop ecx
jmp 0x408930
mov edi, dword [ebp - 0x7c]
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40891d
cmp byte [edi], 0x1a
jne 0x40891d
xor eax, eax
jmp 0x408938
call fcn.0040a3ae
mov dword [eax], 0x1c
call fcn.0040a3b7
and dword [eax], 0
or eax, 0xffffffff
jmp 0x408938
sub eax, dword [ebp - 0x78]
pop esi
pop ebx
mov ecx, dword [ebp + 0x3a0]
xor ecx, ebp
pop edi
call fcn.004095dc
add ebp, 0x3a4
leave
ret
Function at 0x409159
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.00409350
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4091f4
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 [0x42b91c]
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 0x4091f4
cmp eax, 1
je 0x409215
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 0x4091f4
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x4091c1
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x4091f0
xor eax, eax
inc eax
jmp 0x409234
cmp edi, eax
jae 0x4091f8
xor eax, eax
jmp 0x409234
cmp eax, esi
jae 0x4091ff
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 [0x42b91c]
jmp 0x409218
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 0x4093d6
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x4229e0
call fcn.0040a684
mov edi, 0x94
mov eax, edi
call fcn.00409350
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 [0x42b91c], ecx
mov eax, dword [esi + 4]
mov dword [0x42b928], eax
mov edx, dword [esi + 8]
mov dword [0x42b92c], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x42b920], esi
cmp ecx, 2
je 0x409436
or esi, 0x8000
mov dword [0x42b920], esi
shl eax, 8
add eax, edx
mov dword [0x42b924], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x409471
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x409471
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x409489
cmp eax, 0x20b
je 0x409476
mov dword [ebp - 0x1c], esi
jmp 0x40949d
cmp dword [ecx + 0x84], 0xe
jbe 0x409471
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x409497
cmp dword [ecx + 0x74], 0xe
jbe 0x409471
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0040db48
pop ecx
test eax, eax
jne 0x4094b1
push 0x1c
call fcn.004093b2
pop ecx
call fcn.0040ba2b
test eax, eax
jne 0x4094c2
push 0x10
call fcn.004093b2
pop ecx
call fcn.0040bd50
mov dword [ebp - 4], esi
call fcn.0040bdd8
test eax, eax
jge 0x4094db
push 0x1b
call fcn.0040938d
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x42d1e0], eax
call fcn.0040f18a
mov dword [0x42b968], eax
call fcn.0040f0e8
test eax, eax
jge 0x409501
push 8
call fcn.0040938d
pop ecx
call fcn.0040eeb5
test eax, eax
jge 0x409512
push 9
call fcn.0040938d
pop ecx
push 1
call fcn.00408417
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x409528
push eax
call fcn.0040938d
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0040ee58
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x409549
movzx eax, word [ebp - 0x40]
jmp 0x40954c
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00414220
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40956a
push edi
call fcn.00408544
call fcn.00408566
jmp 0x40959c
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040a6bf
ret
Function at 0x409cbd
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
mov edi, dword [ebp + 0x10]
xor ebx, ebx
test edi, edi
jne 0x409cda
call fcn.0040a3ae
mov dword [eax], 0x16
xor eax, eax
jmp 0x409d44
push esi
push 0x8c
push 1
call fcn.0040ae8a
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x409d2f
push esi
call fcn.0040b831
mov eax, dword [ebp + 0x14]
or dword [esi + 4], 0xffffffff
mov dword [esi + 0x50], eax
mov eax, dword [ebp + 0x1c]
test eax, eax
pop ecx
mov dword [esi + 0x4c], edi
jne 0x409d0d
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x18]
push esi
push 0x409c28
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x409d43
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push esi
call fcn.00408f7c
test ebx, ebx
pop ecx
je 0x409d41
push ebx
call fcn.0040a3c0
pop ecx
xor eax, eax
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x40c1db
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x40c3b1
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x42cea0]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x40c3b1
test cl, 0x48
je 0x40c246
cmp byte [eax + 5], 0xa
je 0x40c246
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40c298
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x40c280
call fcn.0040a3ae
mov dword [eax], 9
call fcn.0040a3b7
mov dword [eax], esi
jmp 0x40c290
cmp eax, 0x6d
je 0x40c3b1
push eax
call fcn.0040a3c0
pop ecx
or eax, 0xffffffff
jmp 0x40c3b3
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x40c3ac
test eax, eax
je 0x40c2bf
cmp byte [ebx], 0xa
jne 0x40c2bf
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x40c2c8
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x40c3a6
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x40c396
cmp al, 0xd
je 0x40c2fa
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x40c388
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x40c314
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x40c30f
add dword [ebp + 0x10], 2
jmp 0x40c368
mov dword [ebp + 0x10], eax
jmp 0x40c384
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
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 0x40c33c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40c384
cmp dword [ebp - 0xc], 0
je 0x40c384
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x40c35d
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40c368
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x40c387
cmp ebx, dword [ebp + 0xc]
jne 0x40c36d
cmp byte [ebp - 1], 0xa
jne 0x40c36d
mov byte [ebx], 0xa
jmp 0x40c387
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040c158
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x40c388
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x40c2de
jmp 0x40c3a6
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x40c3a6
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x40c3b3
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40e91a
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 0x40e948
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 0x40e94f
cmp ebx, dword [eax + 4]
jae 0x40e94f
xor eax, eax
jmp 0x40eb3f
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x40e960
xor eax, eax
inc eax
jmp 0x40eb3e
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x40e976
cmp ecx, edx
jae 0x40eabb
cmp dword [eax + 4], 0
je 0x40e97f
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x40e967
cmp dword [ebp + 8], 0
je 0x40e9a1
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x40eabb
cmp eax, esi
jae 0x40eabb
mov eax, dword [0x42bb00]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x40e9c6
cmp dword [esi*4 + 0x42bb08], edi
je 0x40eabf
inc esi
cmp esi, eax
jl 0x40e9b4
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40eb3b
cmp dword [ebp - 8], 0x1000000
jne 0x40eb3b
test byte [ebp - 0xc], 0xcc
je 0x40ea44
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x40eb3b
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x40eb3b
cmp word [eax + 0x18], 0x10b
jne 0x40eb3b
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x40eb3b
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x40ea44
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x40ea44
test byte [ecx + 0x27], 0x80
jne 0x40eabb
push 1
push 0x42bb48
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x40e958
mov ecx, dword [0x42bb00]
test ecx, ecx
mov edx, ecx
jle 0x40ea78
lea eax, [ecx*4 + 0x42bb04]
cmp dword [eax], edi
je 0x40ea78
dec edx
sub eax, 4
test edx, edx
jg 0x40ea6c
test edx, edx
jne 0x40eaa9
push 0xf
pop ebx
cmp ecx, ebx
jg 0x40ea85
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x40ea9d
lea eax, [edx*4 + 0x42bb08]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x40ea8b
cmp ecx, 0x10
jge 0x40eaa9
inc ecx
mov dword [0x42bb00], ecx
push 0
push 0x42bb48
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x40e958
xor eax, eax
jmp 0x40eb3e
test esi, esi
jle 0x40e958
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x42bb48
call ebx
test eax, eax
jne 0x40e958
cmp dword [esi*4 + 0x42bb08], edi
je 0x40eb15
mov eax, dword [0x42bb00]
lea esi, [eax - 1]
test esi, esi
jl 0x40eb03
cmp dword [esi*4 + 0x42bb08], edi
je 0x40eaff
dec esi
jns 0x40eaf3
test esi, esi
jge 0x40eb13
cmp eax, 0x10
jge 0x40eb0e
inc eax
mov dword [0x42bb00], eax
lea esi, [eax - 1]
jmp 0x40eb15
je 0x40eb2d
xor ecx, ecx
test esi, esi
jl 0x40eb2d
lea eax, [ecx*4 + 0x42bb08]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x40eb1b
push 0
push 0x42bb48
call ebx
jmp 0x40e958
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40eb43
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [0x428a58]
mov ecx, dword [ebp + 0x98]
push ebx
xor eax, ebp
push esi
mov dword [ebp + 0x8c], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x429020]
je 0x40eb7a
inc eax
cmp eax, 0x13
jb 0x40eb6b
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x429020]
jne 0x40ec9d
mov eax, dword [0x42b970]
cmp eax, 1
je 0x40ec78
cmp eax, edx
jne 0x40ebaa
cmp dword [0x428a54], 1
je 0x40ec78
cmp ecx, 0xfc
je 0x40ec9d
push 0x104
lea eax, [ebp - 0x7c]
push eax
push edx
mov byte [ebp + 0x88], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40ebe0
lea eax, [ebp - 0x7c]
push str._program_name_unknown_
push eax
call fcn.00410310
pop ecx
pop ecx
lea edi, [ebp - 0x7c]
mov eax, edi
push eax
call fcn.00409950
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40ec14
mov eax, edi
push eax
call fcn.00409950
mov edi, eax
lea eax, [ebp - 0x7c]
sub eax, 0x3b
push 3
add edi, eax
push 0x423230
push edi
call fcn.004120d0
add esp, 0x10
push edi
call fcn.00409950
push dword [esi + 0x429024]
mov ebx, eax
call fcn.00409950
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00409350
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00410310
push edi
push ebx
call fcn.00410320
push 0x423210
push ebx
call fcn.00410320
push dword [esi + 0x429024]
push ebx
call fcn.00410320
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00412239
add esp, 0x2c
jmp 0x40ec9d
push edx
lea eax, [ebp - 0x80]
push eax
lea esi, [esi + 0x429024]
push dword [esi]
call fcn.00409950
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]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x8c]
xor ecx, ebp
call fcn.004095dc
add ebp, 0x90
leave
ret

Function at 0x410d52
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
test eax, eax
je 0x410d80
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 0x410d85
cmp eax, 1
je 0x410d85
xor eax, eax
inc eax
pop ebp
ret
xor eax, eax
pop ebp
ret