joyce8/EMBER2024-capa huggingface dataset:
Function at 0x407010
Capabilities:
Enumerate pe sections

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
xor edx, edx
push ebx
push esi
push edi
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
movzx ebx, word [ecx + 6]
add eax, 0x18
add eax, ecx
test ebx, ebx
je 0x40704e
mov edi, dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
cmp edi, esi
jb 0x407046
mov ecx, dword [eax + 8]
add ecx, esi
cmp edi, ecx
jb 0x407050
inc edx
add eax, 0x28
cmp edx, ebx
jb 0x407036
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x407120
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
mov eax, 0x5a4d
cmp word [ecx], ax
jne 0x407151
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x407151
mov ecx, 0x10b
cmp word [eax + 0x18], cx
jne 0x407151
mov eax, 1
pop ebp
ret
xor eax, eax
pop ebp
ret

Function at 0x401219
Capabilities:
Terminate process

Disassembly:
mov eax, dword fs:[0]
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40701c
push 0x40109a
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
push eax
fnstcw word [esp]
or word [esp], 0x300
fldcw word [esp]
add esp, 4
push 0
push 0
push 0x407028
push 0x407024
push 0x407020
call sub.CRTDLL.DLL___GetMainArgs
push dword [0x407028]
push dword [0x407024]
push dword [0x407020]
mov dword [0x407014], esp
call fcn.0040129c
add esp, 0x18
xor ecx, ecx
mov dword [ebp - 4], ecx
push eax
call sub.CRTDLL.DLL_exit
leave
ret

Function at 0x401941
Capabilities:
Allocate or change rwx memory
Encode data using base64 via winapi

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
push edi
and dword [ebp - 0x124], 0
xor edi, edi
mov byte [ebp - 0x104], 0
mov dword [ebp - 0x11c], 0x14
lea eax, [ebp - 0x11c]
push eax
lea eax, [ebp - 0x118]
push eax
push 1
push 1
lea eax, [ebp - 0x104]
push eax
call sub.CRYPT32.DLL_CryptBinaryToStringW
movzx eax, word [ebp - 0x118]
mov edi, eax
sub edi, 0x41
and dword [ebp - 0x120], 0
lea eax, [ebp - 0x120]
push eax
mov eax, edi
or al, 0x40
push eax
lea eax, [0x404691]
lea edx, [fcn.004019d4]
sub eax, edx
push eax
push fcn.004019d4
call sub.KERNEL32.dll_VirtualProtect
mov eax, edi
pop edi
leave
ret
Function at 0x407e15
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x42e180]
jne 0x407e1f
repz ret
jmp fcn.0040bc0c

Function at 0x40a3fb
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
pushal
call 0x40a40a
pop dword [ebp - 0x48]
mov eax, 0x40a40a
sub dword [ebp - 0x48], eax
mov dword [ebp - 0x58], 0x6cccc723
add dword [ebp - 0x58], 0xe1857e28
mov dword [ebp - 0x54], 0xa1af7d62
sub dword [ebp - 0x54], 0x6f7c311d
mov dword [ebp - 0x50], 0x673aa4c7
sub dword [ebp - 0x50], 0x1aee6099
mov dword [ebp - 0x4c], 0xbb7169d5
sub dword [ebp - 0x4c], 0xbb7169d5
lea eax, [ebp - 0x58]
push eax
mov eax, 0x18697bb6
sub eax, 0x18274b42
add eax, dword [ebp - 0x48]
call dword [eax]
mov dword [ebp - 0x58], 0xe68cf181
sub dword [ebp - 0x58], 0x721a882b
mov dword [ebp - 0x54], 0x99ce2352
sub dword [ebp - 0x54], 0x5861c1dd
mov dword [ebp - 0x50], 0x6f25d98a
sub dword [ebp - 0x50], 0xbb66d1e
mov dword [ebp - 0x4c], 0xa8e29630
sub dword [ebp - 0x4c], 0xa8e29630
lea ebx, [ebp - 0x58]
push ebx
push eax
mov eax, sym.imp.kernel32.dll_GetProcAddress
add eax, dword [ebp - 0x48]
call dword [eax]
push 0x40
push 0x1000
push 0x3bc4f
push 0
call eax
mov ecx, 0x5ca0105c
sub ecx, 0x5c9fd007
mov edx, eax
mov esi, 0x27035f21
sub esi, 0x26c01b21
add esi, dword [ebp - 0x48]
mov ebx, 0x5c6582fa
mov edi, dword [esi]
add dword [ebp - 0x18], 0x1eda3a02
xor edi, ebx
add dword [ebp - 0x28], 0x1ee41293
mov dword [edx], edi
mov dword [ebp - 0x30], 0xf908e85
add edx, 4
add esi, 4
loop 0x40a51c
add eax, 0x943e3151
sub eax, 0x943d3d2a
xor ebx, ebx
add ebx, eax
add eax, 5
mov ecx, 0x2f0c1a63
add ecx, 0xd133e59d
add ecx, dword [ebp - 0x48]
call ebx
leave
ret
Function at 0x40153b
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push esp
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
test byte [esp + 0x2c], 1
je 0x401554
movzx esi, word [esp + 0x30]
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [0x4044e0], eax
mov dword [ebp - 0x4c], 0x30
call fcn.0040152b
mov dword [ebp - 0x48], 3
mov dword [ebp - 0x44], 0x40120e
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x24], str.Trick
mov dword [ebp - 0x20], eax
call fcn.0040151e
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], edi
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.USER32.dll_RegisterClassExW]
test eax, eax
je 0x401626
mov eax, 0x80000000
push edi
push dword [ebp - 0x38]
push edi
push edi
push eax
push eax
push eax
push eax
push 0x80
push str.Qindom
push str.Trick
push edi
call dword [sym.imp.USER32.dll_CreateWindowExW]
push 0
push eax
mov dword [0x4044e8], eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [0x4044e8]
push eax
call dword [sym.imp.USER32.dll_UpdateWindow]
mov esi, dword [sym.imp.USER32.dll_GetMessageW]
push edi
push edi
push edi
lea edx, [ebp - 0x1c]
push edx
call esi
test eax, eax
je 0x401626
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
push ebx
mov ebx, dword [sym.imp.USER32.dll_DispatchMessageW]
lea eax, [ebp - 0x1c]
push eax
call edi
lea ecx, [ebp - 0x1c]
push ecx
call ebx
xor eax, eax
push eax
push eax
push eax
lea edx, [ebp - 0x1c]
push edx
call esi
test eax, eax
jne 0x40160a
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x408954
Capabilities:
Encode data using xor

Disassembly:
mov edx, 0x4085d8
call fcn.0040897f
and esi, esi
dec esi
xor dword [ecx], edx
add eax, eax
add eax, 0x7b4b9a34
add ecx, 1
push esi
mov esi, dword [esp]
add esp, 4
add eax, esi
cmp ecx, ebx
jne fcn.00408954
ret
Function at 0x401e30
Capabilities:
Create process on windows
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x150
push edi
mov eax, dword [ebp + 8]
add eax, 0x110
mov dword [ebp - 4], eax
push 0x20
mov ecx, dword [ebp - 4]
push ecx
call fcn.00408aa0
add esp, 8
test eax, eax
je 0x401e79
push 0x20
mov edx, dword [ebp - 4]
push edx
call fcn.00408aa0
add esp, 8
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov byte [eax], 0
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
jmp 0x401e80
mov dword [ebp - 8], 0
mov ecx, 0xf
xor eax, eax
lea edi, [ebp - 0x44]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x44], 0x3c
mov dword [ebp - 0x40], 0x40
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], 0
mov edx, dword [ebp - 4]
mov dword [ebp - 0x34], edx
mov eax, dword [ebp - 8]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp + 8]
add ecx, 0xc
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], 1
lea edx, [ebp - 0x150]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov eax, dword [ebp + 8]
add eax, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea ecx, [ebp - 0x44]
push ecx
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
lea edx, [ebp - 0x150]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov eax, dword [ebp - 0xc]
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x401f60
Capabilities:
Get geographical location
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov word [ebp - 0x24], 0x409
call dword [sym.imp.KERNEL32.dll_GetVersion]
and eax, 0x80000000
test eax, eax
jne 0x401fd8
call dword [sym.imp.KERNEL32.dll_GetVersion]
and eax, 0xffff
movzx eax, ax
and eax, 0xff
movzx ecx, al
cmp ecx, 4
jle 0x401fd8
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x401fd3
push str.GetUserDefaultUILanguage
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x401fc9
call dword [ebp - 4]
mov word [ebp - 0x24], ax
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x4020d0
call dword [sym.imp.KERNEL32.dll_GetVersion]
and eax, 0x80000000
test eax, eax
jne 0x40205e
lea ecx, [ebp - 0xc]
push ecx
push 0x20019
push 0
push str..DEFAULTControl_PanelInternational
push 0x80000003
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40205c
mov dword [ebp - 0x28], 0x10
lea edx, [ebp - 0x28]
push edx
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x2c]
push ecx
push 0
push str.Locale
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x402052
cmp dword [ebp - 0x2c], 1
jne 0x402052
push 0x10
push 0
lea eax, [ebp - 0x20]
push eax
call fcn.004093bb
add esp, 0xc
mov word [ebp - 0x24], ax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4020d0
lea edx, [ebp - 0xc]
push edx
push 0x20019
push 0
push str.Control_PanelDesktopResourceLocale
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x4020d0
mov dword [ebp - 0x28], 0x10
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x20]
push ecx
lea edx, [ebp - 0x2c]
push edx
push 0
push 0
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x4020c6
cmp dword [ebp - 0x2c], 1
jne 0x4020c6
push 0x10
push 0
lea ecx, [ebp - 0x20]
push ecx
call fcn.004093bb
add esp, 0xc
mov word [ebp - 0x24], ax
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp + 8], 0
je 0x4020ee
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
push 0x1001
movzx edx, word [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
mov ax, word [ebp - 0x24]
mov esp, ebp
pop ebp
ret
Function at 0x4027d0
Capabilities:
Delete file
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x444
push esi
push edi
push 0x413b24
call fcn.00402a10
add esp, 4
push 0x413b30
call fcn.00402a10
add esp, 4
push 0x413b34
call fcn.00402a10
add esp, 4
push 0x413b38
call fcn.00402a10
add esp, 4
push str.xUtilDelayFileDelete
call fcn.00402a10
add esp, 4
push 0x413b58
call fcn.00402a10
add esp, 4
mov eax, dword [ebp + 8]
push eax
push str.delay_deletion_of__s_n
call fcn.00402a10
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetVersion]
and eax, 0x80000000
test eax, eax
jne 0x40285c
push 4
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
jmp 0x4029fe
push 0x104
lea edx, [ebp - 0x418]
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov dword [ebp - 0x41c], str.wininit.ini
mov eax, dword [ebp - 0x41c]
mov dword [ebp - 0x420], eax
mov ecx, dword [ebp - 0x41c]
mov dl, byte [ecx]
mov byte [ebp - 0x421], dl
inc dword [ebp - 0x41c]
cmp byte [ebp - 0x421], 0
jne 0x402884
mov eax, dword [ebp - 0x41c]
sub eax, dword [ebp - 0x420]
mov ecx, dword [ebp - 0x420]
mov dword [ebp - 0x428], ecx
mov dword [ebp - 0x42c], eax
lea edx, [ebp - 0x418]
add edx, 0xffffffff
mov dword [ebp - 0x430], edx
mov eax, dword [ebp - 0x430]
mov cl, byte [eax + 1]
mov byte [ebp - 0x431], cl
inc dword [ebp - 0x430]
cmp byte [ebp - 0x431], 0
jne 0x4028ce
mov edi, dword [ebp - 0x430]
mov esi, dword [ebp - 0x428]
mov edx, dword [ebp - 0x42c]
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x100
lea eax, [ebp - 0x108]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
lea edx, [ebp - 0x418]
push edx
push 0x413b88
call fcn.00403ee0
add esp, 8
mov dword [ebp - 4], eax
push 0
lea eax, [ebp - 0x108]
push eax
push str.NUL_s_c
lea ecx, [ebp - 0x310]
push ecx
call fcn.00408f89
add esp, 0x10
lea edx, [ebp - 0x310]
mov dword [ebp - 0x438], edx
mov eax, dword [ebp - 0x438]
inc eax
mov dword [ebp - 0x43c], eax
mov ecx, dword [ebp - 0x438]
mov dl, byte [ecx]
mov byte [ebp - 0x43d], dl
inc dword [ebp - 0x438]
cmp byte [ebp - 0x43d], 0
jne 0x40296f
mov eax, dword [ebp - 0x438]
sub eax, dword [ebp - 0x43c]
mov dword [ebp - 0x444], eax
mov ecx, dword [ebp - 4]
push ecx
call fcn.00403db0
add esp, 4
mov edx, dword [ebp - 0x444]
lea eax, [eax + edx + 1]
push eax
mov ecx, dword [ebp - 4]
push ecx
call fcn.0040a014
add esp, 8
mov dword [ebp - 4], eax
lea edx, [ebp - 0x310]
push edx
mov eax, dword [ebp - 4]
push eax
call fcn.00403e20
add esp, 8
lea ecx, [ebp - 0x418]
push ecx
mov edx, dword [ebp - 4]
push edx
push str.Rename
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileSectionA]
mov eax, dword [ebp - 4]
push eax
call fcn.00408b5e
add esp, 4
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x402a20
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
and eax, 0x80000000
test eax, eax
jne 0x402a42
push 4
push 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
jmp 0x402a44
xor eax, eax
pop ebp
ret
Function at 0x4030a0
Capabilities:
Create directory
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00402fc0
add esp, 8
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x40312e
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x40312e
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x40312e
push 0x14
call fcn.00402f80
add esp, 4
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [eax], 1
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
mov dword [ecx + 8], edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x18]
mov dword [eax + 0xc], ecx
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x10], 0
mov eax, dword [ebp - 0xc]
jmp 0x4031b8
mov eax, dword [ebp + 0xc]
and eax, 0x100
test eax, eax
je 0x403174
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x14], ecx
push 0x5c
mov edx, dword [ebp - 0x14]
add edx, 1
push edx
call fcn.00408aa0
add esp, 8
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x403174
mov eax, dword [ebp - 0x14]
mov byte [eax], 0
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov edx, dword [ebp - 0x14]
mov byte [edx], 0x5c
jmp 0x403140
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00409aa3
add esp, 0xc
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x403196
or eax, 0xffffffff
jmp 0x4031b8
push 0x14
call fcn.00402f80
add esp, 4
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [eax], 0
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
mov dword [ecx + 4], edx
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret

Function at 0x403ee0
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov dword [ebp - 0xc], 0
mov dword [ebp - 4], 0
mov eax, dword [ebp - 4]
add eax, 0x400
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call fcn.0040a014
add esp, 8
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionA]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 4]
sub ecx, 2
cmp dword [ebp - 8], ecx
je 0x403ef4
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
Function at 0x405371
Capabilities:
Encode data using xor

Disassembly:
mov ecx, dword [esp + 4]
push esi
mov esi, dword [esp + 0xc]
mov eax, esi
shr eax, 2
test eax, eax
push edi
mov edi, dword [esp + 0x14]
jle 0x4053ac
push ebx
movzx edx, byte [ecx]
xor ebx, ebx
inc ecx
mov bh, byte [ecx]
or edx, ebx
inc ecx
movzx ebx, byte [ecx]
shl ebx, 0x10
or edx, ebx
inc ecx
movzx ebx, byte [ecx]
shl ebx, 0x18
or edx, ebx
inc ecx
xor edi, edx
dec eax
jne 0x405389
pop ebx
and esi, 3
xor eax, eax
dec esi
je 0x4053c8
dec esi
je 0x4053c1
dec esi
jne 0x4053cd
movzx eax, byte [ecx]
shl eax, 0x10
inc ecx
xor edx, edx
mov dh, byte [ecx]
or eax, edx
inc ecx
movzx ecx, byte [ecx]
or eax, ecx
xor eax, edi
pop edi
pop esi
ret 0xc

Function at 0x40902a
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x411378
call fcn.0040bc90
mov edi, 0x94
mov eax, edi
call fcn.0040d720
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 [0x415f30], ecx
mov eax, dword [esi + 4]
mov dword [0x415f3c], eax
mov edx, dword [esi + 8]
mov dword [0x415f40], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x415f34], esi
cmp ecx, 2
je 0x40908a
or esi, 0x8000
mov dword [0x415f34], esi
shl eax, 8
add eax, edx
mov dword [0x415f38], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x4090c5
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4090c5
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x4090dd
cmp eax, 0x20b
je 0x4090ca
mov dword [ebp - 0x1c], esi
jmp 0x4090f1
cmp dword [ecx + 0x84], 0xe
jbe 0x4090c5
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x4090eb
cmp dword [ecx + 0x74], 0xe
jbe 0x4090c5
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0040afb8
pop ecx
test eax, eax
jne 0x409105
push 0x1c
call fcn.00409006
pop ecx
call fcn.0040bfa9
test eax, eax
jne 0x409116
push 0x10
call fcn.00409006
pop ecx
call fcn.0040d689
mov dword [ebp - 4], esi
call fcn.0040c0d4
test eax, eax
jge 0x40912f
push 0x1b
call fcn.00408fe1
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x4179c4], eax
call fcn.0040d567
mov dword [0x415dc0], eax
call fcn.0040d4c5
test eax, eax
jge 0x409155
push 8
call fcn.00408fe1
pop ecx
call fcn.0040d292
test eax, eax
jge 0x409166
push 9
call fcn.00408fe1
pop ecx
call fcn.0040c3af
mov dword [ebp - 0x20], eax
cmp eax, esi
je 0x409179
push eax
call fcn.00408fe1
pop ecx
mov dword [ebp - 0x38], esi
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0040d229
mov dword [ebp - 0x68], eax
test byte [ebp - 0x38], 1
je 0x40919a
movzx eax, word [ebp - 0x34]
jmp 0x40919d
push 0xa
pop eax
push eax
push dword [ebp - 0x68]
push esi
push esi
call edi
push eax
call section..text
mov edi, eax
mov dword [ebp - 0x6c], edi
cmp dword [ebp - 0x1c], esi
jne 0x4091bb
push edi
call fcn.0040c4e7
call fcn.0040c509
jmp 0x4091ed
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040bccb
ret
Function at 0x40a2b9
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 0x40a47f
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x4178a0]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x40a47f
test cl, 0x48
je 0x40a31f
mov al, byte [eax + 5]
cmp al, 0xa
je 0x40a31f
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 0x40a371
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x40a359
call fcn.00409737
mov dword [eax], 9
call fcn.00409740
mov dword [eax], esi
jmp 0x40a369
cmp eax, 0x6d
je 0x40a47f
push eax
call fcn.00409749
pop ecx
or eax, 0xffffffff
jmp 0x40a481
mov eax, dword [edi]
mov edx, dword [ebp - 0xc]
add dword [ebp - 8], edx
lea ecx, [eax + esi + 4]
mov al, byte [ecx]
test al, al
jns 0x40a47a
test edx, edx
je 0x40a394
cmp byte [ebx], 0xa
jne 0x40a394
or al, 4
jmp 0x40a396
and al, 0xfb
mov byte [ecx], al
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 0x40a474
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x40a464
cmp al, 0xd
je 0x40a3ca
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x40a456
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x40a3e4
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x40a3df
add dword [ebp + 0x10], 2
jmp 0x40a438
mov dword [ebp + 0x10], eax
jmp 0x40a452
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 0x40a40c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40a452
cmp dword [ebp - 0xc], 0
je 0x40a452
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x40a42d
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40a438
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x40a455
cmp ebx, dword [ebp + 0xc]
jne 0x40a43d
cmp byte [ebp - 1], 0xa
jne 0x40a43d
mov byte [ebx], 0xa
jmp 0x40a455
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040a781
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x40a456
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x40a3ae
jmp 0x40a474
mov eax, dword [edi]
lea esi, [eax + esi + 4]
mov al, byte [esi]
test al, 0x40
jne 0x40a474
or al, 2
mov byte [esi], al
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x40a481
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret