joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403cf1
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, 0x414cb3
call fcn.0040c7c8
sub esp, 0x420
mov eax, dword [0x41c120]
push ebx
push esi
push edi
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
call dword [0x41c060]
xor ebx, ebx
mov dword [ebp - 0x41c], eax
mov dword [ebp - 0x420], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x428], esi
mov dword [ebp - 0x42c], ebx
mov dword [ebp - 0x418], ebx
cmp dword [ebp + 8], ebx
mov byte [ebp - 4], 1
je 0x403db4
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [eax + eax + 2]
cmp edi, 0x400
jg 0x403d77
push edi
call fcn.0040369e
test al, al
pop ecx
je 0x403d77
mov eax, edi
add eax, 3
and eax, 0xfffffffc
call fcn.0040d130
mov dword [ebp - 0x10], esp
mov esi, esp
jmp 0x403d90
lea eax, [edi + 8]
push eax
call fcn.0040d11b
cmp eax, ebx
pop ecx
je 0x403db4
mov dword [eax], ebx
mov dword [ebp - 0x420], eax
lea esi, [eax + 8]
cmp esi, ebx
je 0x403db4
push ebx
push ebx
push edi
push esi
push 0xffffffffffffffff
push dword [ebp + 8]
mov byte [esi], bl
push ebx
push dword [ebp - 0x41c]
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, esi
jmp 0x403db6
xor eax, eax
cmp eax, ebx
jne 0x403ddd
lea eax, [ebp - 0x414]
cmp dword [ebp - 0x418], eax
je 0x403dd3
lea ecx, [ebp - 0x418]
call fcn.0040518a
mov esi, 0x8007000e
jmp 0x403edf
push 2
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov edi, eax
cmp edi, ebx
mov dword [ebp - 0x424], edi
jne 0x403dff
call fcn.004036f7
mov esi, eax
jmp 0x403ec6
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
cmp esi, ebx
je 0x403e24
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
mov dword [ebp - 0x41c], eax
jne 0x403e2e
call fcn.004036f7
jmp 0x403eb8
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
lea eax, [esi + 1]
cmp eax, 0x400
mov dword [ebp + 8], esi
mov byte [ebp - 4], 2
jbe 0x403e5d
push eax
lea ecx, [ebp - 0x418]
call fcn.00405193
jmp 0x403e70
lea eax, [ebp - 0x414]
mov dword [ebp - 0x418], eax
jmp 0x403e70
cmp dword [ebp - 0x418], ebx
mov dword [ebp - 4], 1
jne 0x403e86
mov esi, 0x8007000e
jmp 0x403eba
push esi
push dword [ebp - 0x41c]
push dword [ebp - 0x418]
call fcn.0040b6c0
mov eax, dword [ebp - 0x418]
add esp, 0xc
push dword [ebp + 0x14]
mov byte [esi + eax], bl
push dword [ebp - 0x418]
lea ecx, [ebp - 0x42c]
call fcn.00403f18
mov esi, eax
push dword [ebp - 0x424]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp - 0x414]
cmp dword [ebp - 0x418], eax
je 0x403edf
lea ecx, [ebp - 0x418]
call fcn.0040518a
lea ecx, [ebp - 0x420]
call fcn.004039ab
mov eax, esi
lea esp, [ebp - 0x438]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x14]
call fcn.0040bd6e
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x404bd9
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
lea ebp, [esp - 0x94]
sub esp, 0x114
mov eax, dword [0x41c120]
push ebx
push esi
push 0x2001f
push dword [ebp + 0x9c]
mov ebx, ecx
push dword [ebx]
xor esi, esi
lea ecx, [ebp - 0x74]
mov dword [ebp + 0x90], eax
mov dword [ebp - 0x74], esi
call fcn.00404b0a
cmp eax, esi
jne 0x404c61
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
jmp 0x404c2a
lea eax, [ebp - 0x70]
push eax
call fcn.00404bd9
cmp eax, esi
jne 0x404c60
lea eax, [ebp - 0x80]
push eax
push esi
push esi
push esi
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x70]
push eax
push esi
push dword [ebp - 0x74]
mov dword [ebp - 0x78], 0x100
call edi
test eax, eax
lea ecx, [ebp - 0x74]
je 0x404c1d
call fcn.00404af3
push dword [ebp + 0x9c]
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
pop edi
lea ecx, [ebp - 0x74]
mov esi, eax
call fcn.00404af3
mov ecx, dword [ebp + 0x90]
mov eax, esi
pop esi
pop ebx
call fcn.0040bd6e
add ebp, 0x94
leave
ret 4
Function at 0x405096
Capabilities:
Set registry value

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0x10]
push edi
mov ebx, ecx
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
add esi, eax
add edi, eax
cmp eax, 1
jne 0x4050a1
push edi
push dword [esp + 0x18]
push 7
push 0
push dword [esp + 0x20]
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
pop edi
pop esi
pop ebx
ret 8
Function at 0x40638e
Capabilities:
Create directory

Disassembly:
mov eax, 0x414f13
call fcn.0040c7c8
sub esp, 0xc
push ebx
lea eax, [ebp + 8]
xor ebx, ebx
push eax
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], ebx
call fcn.00401515
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx - 0xc]
cmp eax, ebx
mov byte [ebp - 4], 1
jne 0x4063d3
add ecx, 0xfffffff0
call fcn.004012f9
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.004012f9
jmp 0x406483
dec eax
push eax
lea ecx, [ebp - 0x10]
call fcn.00402cd5
cmp al, 0x5c
je 0x4063eb
push 0x5c
lea ecx, [ebp - 0x10]
call fcn.00402f06
push esi
push edi
push 0x4162f0
lea ecx, [ebp - 0x14]
call fcn.00401d17
mov byte [ebp - 4], 2
push ebx
mov edi, 0x416904
jmp 0x406450
mov eax, esi
sub eax, ebx
inc eax
push eax
push ebx
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x10]
call fcn.004018a4
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 3
call fcn.004056d0
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
mov byte [ebp - 4], 2
call fcn.004012f9
push 0
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 0x7c
push esi
lea ecx, [ebp - 0x10]
lea ebx, [esi + 1]
call fcn.00402db9
push 0
lea ecx, [ebp - 0x10]
push edi
call fcn.00401496
mov esi, eax
cmp esi, 0xffffffff
jne 0x406406
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.004012f9
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
call fcn.004012f9
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.004012f9
pop edi
pop esi
mov ecx, dword [ebp - 0xc]
pop ebx
mov dword fs:[0], ecx
leave
ret 4

Function at 0x406503
Capabilities:
Create process on windows

Disassembly:
mov eax, 0x414f35
call fcn.0040c7c8
sub esp, 0x10
and dword [ebp - 0x14], 0
push ebx
push esi
mov esi, ecx
push edi
lea ecx, [ebp - 0x18]
call fcn.00401722
and dword [ebp - 4], 0
push ecx
mov dword [ebp - 0x10], esp
mov ecx, esp
lea edi, [esi + 0x18]
push edi
call fcn.00401515
push ecx
mov dword [ebp - 0x1c], esp
mov ecx, esp
lea ebx, [esi + 0x14]
push ebx
mov byte [ebp - 4], 1
call fcn.00401515
mov ecx, esi
mov byte [ebp - 4], 0
call fcn.00406064
xor esi, esi
cmp eax, esi
je 0x40659b
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x14], 1
call fcn.00401722
push dword [edi]
lea eax, [ebp - 0x10]
push dword [ebx]
mov byte [ebp - 4], 2
push str._s_s
push eax
call fcn.00402ffc
mov edi, dword [ebp - 0x10]
add esp, 0x10
push esi
push esi
push esi
push edi
push str.open
push esi
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
lea ecx, [edi - 0x10]
call fcn.004012f9
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.004012f9
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x14]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret
Function at 0x4065b8
Capabilities:
Create thread

Disassembly:
mov eax, dword [esp + 4]
dec eax
dec eax
push edi
mov edi, ecx
je 0x4065f1
dec eax
dec eax
jne 0x40664f
lea eax, [esp + 8]
push eax
xor eax, eax
push eax
push edi
push 0x405762
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 4
push dword [edi + 4]
mov dword [edi + 0x1c], eax
call dword [sym.imp.USER32.dll_KillTimer]
jmp 0x40664f
mov ecx, edi
call fcn.00405c99
test eax, eax
je 0x406640
push ebx
push ebp
push esi
push 5
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov ebx, dword [sym.imp.USER32.dll_GetWindow]
push eax
call ebx
mov ebp, dword [sym.imp.USER32.dll_IsWindow]
jmp 0x40662d
push str.ALL_AUTOUPDATE_CLT
push esi
call dword [sym.imp.USER32.dll_GetPropA]
test eax, eax
jne 0x40663d
push 2
push esi
call ebx
mov esi, eax
push esi
call ebp
test eax, eax
jne 0x406618
mov ecx, edi
call fcn.00406503
pop esi
pop ebp
pop ebx
xor eax, eax
push eax
push eax
push 0x10
push dword [edi + 4]
call dword [sym.imp.USER32.dll_SendMessageA]
pop edi
ret 4

Function at 0x406cf1
Capabilities:
Create service
Persist via windows service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x41c120]
push edi
mov dword [ebp - 4], eax
mov edi, ecx
call fcn.00406cb3
test eax, eax
je 0x406d13
xor eax, eax
inc eax
jmp 0x406d82
push ebx
push esi
push 0xf003f
xor esi, esi
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
cmp ebx, esi
jne 0x406d2e
xor eax, eax
jmp 0x406d80
push 0x104
lea eax, [ebp - 0x108]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push esi
push esi
push str.RPCSS
push esi
push esi
lea ecx, [ebp - 0x108]
push ecx
push 1
push 2
push 0x110
push 0xf01ff
lea eax, [edi + 0x30]
push eax
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
cmp eax, esi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
je 0x406d7b
push eax
call edi
xor esi, esi
inc esi
push ebx
call edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
pop edi
call fcn.0040bd6e
leave
ret

Function at 0x406d8d
Capabilities:
Delete service
Stop service

Disassembly:
sub esp, 0x1c
push esi
mov esi, ecx
call fcn.00406cb3
test eax, eax
jne 0x406d9f
inc eax
jmp 0x406e05
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
jne 0x406db9
xor eax, eax
jmp 0x406e04
push 0x10020
add esi, 0x30
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x406dd8
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x406db5
push ebx
lea eax, [esp + 0xc]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebx, eax
call esi
push edi
call esi
xor eax, eax
test ebx, ebx
setne al
pop ebx
pop edi
pop esi
add esp, 0x1c
ret
Function at 0x406e0a
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x41c120]
push esi
mov dword [ebp - 4], eax
push edi
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x104]
push eax
call fcn.0040cf36
lea eax, [ebp - 0x104]
mov dword [ebp - 0x108], eax
mov eax, dword [ebp + 8]
xor esi, esi
add esp, 0xc
cmp dword [eax + 0x154], esi
je 0x406e7d
add eax, 0x30
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov edi, eax
cmp edi, esi
je 0x406e8a
push esi
lea eax, [ebp - 0x108]
push eax
push esi
push 1
push esi
push esi
push esi
push 4
push edi
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
push edi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
jmp 0x406e8a
lea eax, [ebp - 0x104]
push eax
call fcn.0040d6b4
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
call fcn.0040bd6e
leave
ret

Function at 0x407a92
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov edx, dword [esp + 8]
test edx, edx
jne 0x407a9d
xor eax, eax
ret
mov eax, dword [esp + 0xc]
cmp eax, 8
push ebx
push esi
mov esi, dword [esp + 0xc]
not esi
mov ecx, 0xff
jb 0x407b60
push edi
mov edi, eax
shr edi, 3
xor ebx, ebx
mov bl, byte [edx]
sub eax, 8
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x417e70]
xor ebx, ebx
inc edx
mov bl, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x417e70]
xor ebx, ebx
inc edx
mov bl, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x417e70]
xor ebx, ebx
inc edx
mov bl, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x417e70]
xor ebx, ebx
inc edx
mov bl, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x417e70]
xor ebx, ebx
inc edx
mov bl, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x417e70]
xor ebx, ebx
inc edx
mov bl, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x417e70]
xor ebx, ebx
inc edx
mov bl, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x417e70]
inc edx
dec edi
jne 0x407abd
pop edi
test eax, eax
je 0x407b7a
xor ebx, ebx
mov bl, byte [edx]
xor ebx, esi
and ebx, ecx
shr esi, 8
xor esi, dword [ebx*4 + 0x417e70]
inc edx
dec eax
jne 0x407b64
mov eax, esi
pop esi
not eax
pop ebx
ret

Function at 0x407b81
Capabilities:
Hash data with crc32

Disassembly:
mov ecx, dword [esp + 4]
mov edx, dword [ecx]
xor eax, eax
mov al, byte [esp + 8]
push esi
mov esi, 0xff
xor eax, edx
and eax, esi
mov eax, dword [eax*4 + 0x417e70]
shr edx, 8
xor eax, edx
mov dword [ecx], eax
and eax, esi
add eax, dword [ecx + 4]
imul eax, eax, 0x8088405
lea edx, [eax + 1]
mov eax, dword [ecx + 8]
mov dword [ecx + 4], edx
shr edx, 0x18
xor edx, eax
and edx, esi
shr eax, 8
xor eax, dword [edx*4 + 0x417e70]
pop esi
mov dword [ecx + 8], eax
ret
Function at 0x40801a
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 0xc]
imul edi, dword [ebp + 0x10]
cmp byte [esi], 0
je 0x40804e
push 0
lea eax, [ebp + 0x10]
push eax
push edi
push dword [ebp + 8]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x408049
mov byte [esi + 8], 1
mov eax, dword [ebp + 0x10]
jmp 0x408076
mov ecx, dword [esi + 0x1c]
mov eax, dword [esi + 0x18]
lea edx, [ecx + edi]
cmp edx, eax
jbe 0x40805f
sub eax, ecx
mov edi, eax
mov eax, dword [esi + 0x14]
push edi
add eax, ecx
push eax
push dword [ebp + 8]
call fcn.0040b6c0
add esp, 0xc
add dword [esi + 0x1c], edi
mov eax, edi
xor edx, edx
div dword [ebp + 0xc]
pop edi
pop esi
pop ebp
ret

Function at 0x408e04
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x41c120]
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
mov dword [ebp - 4], eax
push edi
je 0x408e33
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x408e33
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov edi, dword [ebp + 0xc]
mov al, byte [edi]
test al, al
je 0x408ecd
push esi
mov esi, edi
mov ecx, edi
cmp al, 0x2f
je 0x408e4d
cmp al, 0x5c
jne 0x408e4f
mov esi, ecx
inc ecx
mov al, byte [ecx]
test al, al
jne 0x408e45
cmp esi, edi
je 0x408e82
sub esi, edi
push esi
lea eax, [ebp - 0x20c]
push edi
push eax
call fcn.0040b6c0
lea eax, [ebp - 0x20c]
push eax
push ebx
mov byte [ebp + esi - 0x20c], 0
call fcn.00408e04
add esp, 0x14
test ebx, ebx
mov byte [ebp - 0x108], 0
pop esi
je 0x408e9d
lea eax, [ebp - 0x108]
push ebx
push eax
call fcn.0040c980
pop ecx
pop ecx
lea eax, [ebp - 0x108]
push edi
push eax
call fcn.0040c990
pop ecx
pop ecx
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x408ecd
push 0
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ecx, dword [ebp - 4]
pop edi
pop ebx
call fcn.0040bd6e
leave
ret

Function at 0x40a4bd
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
cmp dword [esi], 0
jne 0x40a565
cmp dword [esi + 4], 0xffffffff
jne 0x40a565
push edi
lea edi, [esi + 0x140]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push edi
call fcn.0040b630
mov al, byte [eax + esi + 0x13f]
cmp al, 0x5c
pop ecx
je 0x40a50c
cmp al, 0x2f
je 0x40a50c
push 0x416904
push edi
call fcn.0040c990
pop ecx
pop ecx
cmp dword [ebp + 0x10], 1
pop edi
jne 0x40a52e
push 1
push 0
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x40a52e
mov eax, 0x2000000
jmp 0x40a56a
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00407e48
add esp, 0x10
test eax, eax
jne 0x40a54c
mov eax, dword [ebp + 0x10]
jmp 0x40a56a
push eax
call fcn.00409fa0
mov dword [esi], eax
neg eax
sbb eax, eax
and eax, 0xfffffe00
pop ecx
add eax, 0x200
jmp 0x40a56a
mov eax, 0x1000000
pop esi
pop ebp
ret 0xc
Function at 0x40aedd
Capabilities:
Hash data with crc32

Disassembly:
mov ecx, dword [esp + 4]
mov edx, dword [ecx]
xor eax, eax
mov al, byte [esp + 8]
push esi
mov esi, 0xff
xor eax, edx
and eax, esi
mov eax, dword [eax*4 + 0x4186e0]
shr edx, 8
xor eax, edx
mov dword [ecx], eax
and eax, esi
add eax, dword [ecx + 4]
imul eax, eax, 0x8088405
lea edx, [eax + 1]
mov eax, dword [ecx + 8]
mov dword [ecx + 4], edx
shr edx, 0x18
xor edx, eax
and edx, esi
shr eax, 8
xor eax, dword [edx*4 + 0x4186e0]
pop esi
mov dword [ecx + 8], eax
ret

Function at 0x40afa6
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
cmp byte [esi + 0x2d], 0
push edi
mov edi, dword [ebp + 0xc]
je 0x40b01b
mov eax, dword [esi + 0x3c]
xor ebx, ebx
cmp eax, ebx
je 0x40afd2
cmp dword [esi + 0x40], edi
jae 0x40afd2
push eax
call fcn.0040c8a5
pop ecx
mov dword [esi + 0x3c], ebx
cmp dword [esi + 0x3c], ebx
jne 0x40afe7
lea eax, [edi + edi]
push eax
call fcn.0040b58b
pop ecx
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], edi
push edi
push dword [ebp + 8]
push dword [esi + 0x3c]
call fcn.0040b6c0
add esp, 0xc
test edi, edi
jbe 0x40b018
mov eax, dword [esi + 0x3c]
movsx eax, byte [ebx + eax]
push eax
lea eax, [esi + 0x30]
push eax
call fcn.0040af46
pop ecx
pop ecx
mov ecx, dword [esi + 0x3c]
mov byte [ebx + ecx], al
inc ebx
cmp ebx, edi
jb 0x40affa
mov edx, dword [esi + 0x3c]
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x40b04a
mov eax, dword [esi + 0x24]
lea ebx, [eax + edi]
cmp ebx, dword [esi + 0x28]
jb 0x40b036
mov dword [esi + 0x14], 0x30000
jmp 0x40b06c
push edi
push edx
add eax, ecx
push eax
call fcn.0040b6c0
add esp, 0xc
add dword [esi + 0x24], edi
mov eax, edi
jmp 0x40b06e
mov eax, dword [esi + 4]
test eax, eax
je 0x40b065
push 0
lea ecx, [ebp + 8]
push ecx
push edi
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp + 8]
jmp 0x40b06e
mov dword [esi + 0x14], 0x1000000
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x40bedc
Capabilities:
Terminate process

Disassembly:
push 8
push 0x418bf8
call fcn.0040cd10
push 8
call fcn.0040e01b
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x41cf3c], esi
jne 0x40bf10
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x41cf38], esi
mov al, byte [ebp + 0x10]
mov byte [0x41cf34], al
cmp dword [ebp + 0xc], edi
jne 0x40bf5a
cmp dword [0x41e76c], edi
je 0x40bf4a
mov eax, dword [0x41e768]
sub eax, 4
mov dword [0x41e768], eax
cmp eax, dword [0x41e76c]
jb 0x40bf4a
mov eax, dword [eax]
cmp eax, edi
je 0x40bf2b
call eax
jmp 0x40bf2b
push 0x41c044
mov eax, 0x41c03c
call fcn.0040be5a
pop ecx
push 0x41c050
mov eax, 0x41c048
call fcn.0040be5a
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x40bf8b
cmp dword [ebp + 0x10], edi
jne 0x40bf99
mov dword [0x41cf3c], esi
push dword [ebp + 8]
call fcn.0040be18
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x40bf98
push 8
call fcn.0040df66
pop ecx
ret
call fcn.0040cd4b
ret
Function at 0x40cfbd
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40cfdd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0041189f
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x40d000
test byte [esp + 8], 2
je 0x40d000
call fcn.0041188d
mov dword [eax], 0xd
call fcn.00411896
mov dword [eax], 5
jmp 0x40cfd9
xor eax, eax
ret

Function at 0x40d16d
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.0040d130
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40d208
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 [0x41cefc]
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 0x40d208
cmp eax, 1
je 0x40d229
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 0x40d208
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x40d1d5
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40d204
xor eax, eax
inc eax
jmp 0x40d248
cmp edi, eax
jae 0x40d20c
xor eax, eax
jmp 0x40d248
cmp eax, esi
jae 0x40d213
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 [0x41cefc]
jmp 0x40d22c
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 0x40db2a
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x418cc8
call fcn.0040cd10
mov edi, 0x94
mov eax, edi
call fcn.0040d130
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 [0x41cefc], ecx
mov eax, dword [esi + 4]
mov dword [0x41cf08], eax
mov edx, dword [esi + 8]
mov dword [0x41cf0c], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x41cf00], esi
cmp ecx, 2
je 0x40db8a
or esi, 0x8000
mov dword [0x41cf00], esi
shl eax, 8
add eax, edx
mov dword [0x41cf04], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x40dbc5
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40dbc5
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40dbdd
cmp eax, 0x20b
je 0x40dbca
mov dword [ebp - 0x1c], esi
jmp 0x40dbf1
cmp dword [ecx + 0x84], 0xe
jbe 0x40dbc5
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x40dbeb
cmp dword [ecx + 0x74], 0xe
jbe 0x40dbc5
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0041192c
pop ecx
test eax, eax
jne 0x40dc05
push 0x1c
call fcn.0040db06
pop ecx
call fcn.0040eade
test eax, eax
jne 0x40dc16
push 0x10
call fcn.0040db06
pop ecx
call fcn.0040e0ba
mov dword [ebp - 4], esi
call fcn.00412d77
test eax, eax
jge 0x40dc2f
push 0x1b
call fcn.0040dae1
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x41e760], eax
call fcn.00412c55
mov dword [0x41cf40], eax
call fcn.00412bb3
test eax, eax
jge 0x40dc55
push 8
call fcn.0040dae1
pop ecx
call fcn.00412980
test eax, eax
jge 0x40dc66
push 9
call fcn.0040dae1
pop ecx
push 1
call fcn.0040be72
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x40dc7c
push eax
call fcn.0040dae1
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00412923
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x40dc9d
movzx eax, word [ebp - 0x40]
jmp 0x40dca0
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.0040266e
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40dcbe
push edi
call fcn.0040bf9f
call fcn.0040bfc1
jmp 0x40dcf0
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040cd4b
ret