joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40ae80
Capabilities:
Check if file exists
Get file attributes
Query or enumerate registry value

Disassembly:
sub esp, 0x10
mov eax, dword [0x422978]
push ebp
push esi
push edi
mov ecx, 0x422978
xor ebp, ebp
call dword [eax + 0xc]
mov edi, eax
add edi, 0x10
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstall_
lea ecx, [esp + 0x14]
mov dword [esp + 0x10], edi
call fcn.004047c0
mov edx, dword [esp + 0x20]
test edx, edx
jne 0x40aeb8
xor eax, eax
jmp 0x40aec9
mov eax, edx
lea esi, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40aec0
sub eax, esi
push eax
push edx
lea ecx, [esp + 0x18]
call fcn.00403dd0
mov esi, dword [esp + 0x10]
lea ecx, [esp + 0x20]
push ecx
push 0x2001f
push 0
push esi
push 0x80000002
mov dword [esp + 0x34], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40b028
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x14]
push edx
push 0
lea ecx, [esp + 0x20]
push ecx
push 0
push str.InstallLocation
mov ebp, eax
push eax
mov dword [esp + 0x38], ebp
mov dword [esp + 0x2c], 0
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40b028
mov eax, dword [esp + 0x18]
cmp eax, 1
je 0x40af46
cmp eax, 2
jne 0x40b028
mov eax, dword [esp + 0x14]
test eax, eax
mov dword [esp + 0x14], eax
jbe 0x40b028
lea edx, [esp + 0x14]
push edx
dec eax
push eax
lea ecx, [esp + 0x14]
call fcn.00409e30
push eax
push str.InstallLocation
lea ecx, [esp + 0x2c]
call fcn.00408ec0
test eax, eax
jne 0x40b024
mov eax, dword [esp + 0xc]
mov ecx, dword [eax - 0xc]
test ecx, ecx
jne 0x40afae
lea ecx, [esp + 0x10]
call fcn.00403a20
lea ecx, [esp + 0xc]
call fcn.00403a20
lea ecx, [esp + 0x20]
call fcn.00409b50
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x10
ret 8
mov ecx, dword [esp + 0x14]
add ecx, 0xfffffffe
push ecx
lea ecx, [esp + 0x10]
call fcn.004039e0
cmp al, 0x5c
lea ecx, [esp + 0xc]
push 0x41d38c
je 0x40afd8
call fcn.00404640
mov edx, dword [esp + 0x24]
push edx
jmp 0x40afe2
call fcn.00404640
mov eax, dword [esp + 0x24]
push eax
lea ecx, [esp + 0x10]
call fcn.00404640
mov edi, dword [esp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40b028
lea ecx, [esp + 0x10]
call fcn.00403a20
lea ecx, [esp + 0xc]
call fcn.00403a20
lea ecx, [esp + 0x20]
call fcn.00409b50
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x10
ret 8
mov edi, dword [esp + 0xc]
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b042
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [edi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b05c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
test ebp, ebp
je 0x40b067
push ebp
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x10
ret 8
Function at 0x40b3f0
Capabilities:
Write file on windows

Disassembly:
push ecx
mov eax, dword [esp + 8]
push ebp
push esi
push edi
mov esi, ecx
push eax
lea ecx, [esp + 0x18]
call fcn.004047c0
mov ebp, dword [esp + 0x14]
push 0
push 0
push 2
push 0
push 3
push 0xc0000000
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40b471
mov eax, dword [esi + 0xa0]
add esi, 0xa0
mov dword [esp + 0xc], 0
mov ecx, dword [eax - 4]
push ebx
mov ebx, dword [eax - 0xc]
sub eax, 0x10
cmp ecx, 1
jle 0x40b453
mov ecx, dword [eax + 4]
push ecx
mov ecx, esi
call fcn.004034f0
mov esi, dword [esi]
push 0
lea edx, [esp + 0x14]
push edx
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
pop ebx
push edi
jne 0x40b494
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b48b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
pop edi
pop esi
xor eax, eax
pop ebp
pop ecx
ret 4
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b4b4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
pop edi
pop esi
mov eax, 1
pop ebp
pop ecx
ret 4
Function at 0x40c850
Capabilities:
Delete registry value
Persist via run registry key
Query or enumerate registry value

Disassembly:
sub esp, 8
push edi
mov edi, ecx
mov eax, dword [edi + 0x74]
test eax, eax
jne 0x40c86a
call fcn.0040bae0
test eax, eax
je 0x40c8f5
push esi
lea eax, [esp + 8]
push eax
push 0x2001f
xor esi, esi
push esi
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
push 0x80000002
mov dword [esp + 0x1c], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40c8d6
mov esi, dword [esp + 8]
lea ecx, [esp + 8]
push ecx
push eax
lea edx, [esp + 0x14]
push edx
push eax
push str.RavDown
push esi
mov dword [esp + 0x20], eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40c8d6
mov eax, dword [esp + 0xc]
cmp eax, 1
je 0x40c8c2
cmp eax, 2
jne 0x40c8d6
mov eax, dword [esp + 8]
test eax, eax
jbe 0x40c8d6
push str.RavDown
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov eax, dword [edi + 0x84]
push 0
push 1
push eax
call fcn.0040d8c0
add esp, 0xc
test esi, esi
je 0x40c8f4
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
mov eax, dword [edi + 0x68]
test eax, eax
pop edi
je 0x40c90d
push 0
push 6
push 0x7e8
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
add esp, 8
ret

Function at 0x40cb30
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x10
test ebx, ebx
push ebp
mov ebp, dword [esp + 0x18]
je 0x40cc6c
test esi, esi
je 0x40cc6c
xor eax, eax
lea ebx, [ebx]
mov byte [eax + esi], al
inc eax
cmp eax, 0x100
jl 0x40cb50
mov edx, 1
sub edx, esi
mov dword [esp + 8], edx
mov edx, 2
sub edx, esi
mov dword [esp + 0xc], edx
push edi
xor eax, eax
mov edx, 3
xor edi, edi
sub edx, esi
mov dword [esp + 8], eax
mov ecx, esi
mov dword [esp + 0x14], edx
cdq
idiv ebp
movzx eax, byte [edx + ebx]
movzx edx, byte [ecx]
add eax, edi
add edx, eax
mov edi, edx
and edi, 0x800000ff
jns 0x40cba7
dec edi
or edi, 0xffffff00
inc edi
mov dl, byte [edi + esi]
mov al, byte [ecx]
mov byte [ecx], dl
mov byte [edi + esi], al
mov eax, dword [esp + 0xc]
add eax, ecx
cdq
idiv ebp
movzx eax, byte [ecx + 1]
movzx edx, byte [edx + ebx]
add edx, edi
add eax, edx
mov edi, eax
and edi, 0x800000ff
jns 0x40cbd8
dec edi
or edi, 0xffffff00
inc edi
mov dl, byte [edi + esi]
mov al, byte [ecx + 1]
mov byte [ecx + 1], dl
mov byte [edi + esi], al
mov eax, dword [esp + 0x10]
add eax, ecx
cdq
idiv ebp
movzx eax, byte [ecx + 2]
movzx edx, byte [edx + ebx]
add edx, edi
add eax, edx
mov edi, eax
and edi, 0x800000ff
jns 0x40cc0b
dec edi
or edi, 0xffffff00
inc edi
mov dl, byte [edi + esi]
mov al, byte [ecx + 2]
mov byte [ecx + 2], dl
mov byte [edi + esi], al
mov eax, dword [esp + 0x14]
add eax, ecx
cdq
idiv ebp
movzx eax, byte [ecx + 3]
movzx edx, byte [edx + ebx]
add edx, edi
add eax, edx
mov edi, eax
and edi, 0x800000ff
jns 0x40cc3e
dec edi
or edi, 0xffffff00
inc edi
mov al, byte [ecx + 3]
mov dl, byte [edi + esi]
mov byte [ecx + 3], dl
mov byte [edi + esi], al
mov eax, dword [esp + 8]
add eax, 4
add ecx, 4
cmp eax, 0x100
mov dword [esp + 8], eax
jl 0x40cb87
pop edi
or eax, 0xffffffff
pop ebp
add esp, 0x10
ret
xor eax, eax
pop ebp
add esp, 0x10
ret
Function at 0x40db60
Capabilities:
Check if file exists
Create directory
Delete file
Get file attributes
Set file attributes

Disassembly:
sub esp, 0x10c
mov eax, dword [str._u]
xor eax, esp
mov dword [esp + 0x108], eax
mov eax, dword [esp + 0x114]
push ebx
push esi
mov esi, dword [esp + 0x118]
push edi
mov dword [esp + 0xc], eax
xor eax, eax
test esi, esi
mov byte [esp + 0x10], 0
mov ecx, 0x40
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ebx, 1
stosb byte es:[edi], al
je 0x40dbc6
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
call edi
test eax, eax
jle 0x40dbc6
push esi
call edi
cmp eax, 0x104
jbe 0x40dbe0
push 0x6f
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x108]
xor ecx, esp
call fcn.0041277f
add esp, 0x10c
ret
push ebp
push 0x103
push esi
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea edx, [esp + 0x14]
push edx
call dword [sym.imp.SHLWAPI.dll_PathSkipRootA]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebp, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea esp, [esp]
test eax, eax
je 0x40dc81
push 0x5c
push eax
call fcn.00412d4c
mov esi, eax
add esp, 8
test esi, esi
je 0x40dc81
lea eax, [esp + 0x14]
push eax
mov byte [esi], 0
call edi
cmp eax, 0xffffffff
je 0x40dc38
test al, 0x10
jne 0x40dc79
test al, 0x10
jne 0x40dc53
push 0x80
lea ecx, [esp + 0x18]
push ecx
call ebp
lea edx, [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [esp + 0x10]
push eax
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
and ebx, eax
jne 0x40dc79
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40dc79
mov ebx, 1
mov byte [esi], 0x5c
lea eax, [esi + 1]
jmp 0x40dc10
lea edx, [esp + 0x14]
push edx
call edi
cmp eax, 0xffffffff
je 0x40dc91
test al, 0x10
jne 0x40dcd2
test al, 0x10
jne 0x40dcac
push 0x80
lea eax, [esp + 0x18]
push eax
call ebp
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov edx, dword [esp + 0x10]
push edx
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
and ebx, eax
jne 0x40dcd2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40dcd2
mov ebx, 1
mov ecx, dword [esp + 0x118]
pop ebp
pop edi
pop esi
mov eax, ebx
pop ebx
xor ecx, esp
call fcn.0041277f
add esp, 0x10c
ret
Function at 0x40dcf0
Capabilities:
Check if file exists
Copy file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x114
mov eax, dword [str._u]
xor eax, ebp
push ebx
mov ebx, dword [ebp + 8]
mov dword [esp + 0x114], eax
push esi
mov esi, dword [ebp + 0xc]
push edi
xor eax, eax
mov byte [esp + 0x10], 0
mov ecx, 0x40
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, esi
mov dword [esp + 0xc], ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40dd31
sub eax, edx
cmp eax, 0x103
jbe 0x40dd48
push 0x6f
jmp 0x40de10
push 0x103
lea eax, [esp + 0x14]
push esi
push eax
call fcn.0041343d
lea ecx, [esp + 0x1c]
push 0x5c
push ecx
call fcn.00413064
add esp, 0x14
test eax, eax
je 0x40de0e
lea edx, [esp + 0x10]
push edx
mov byte [eax], 0
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 3
jge 0x40dd92
push 0x41d38c
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
push ebx
call edi
test eax, eax
jne 0x40dda3
push 2
jmp 0x40de10
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x40ddc1
lea ecx, [esp + 0x10]
push 0
push ecx
call fcn.0040db60
add esp, 8
test eax, eax
jne 0x40ddc1
push 0x52
jmp 0x40de10
push esi
call edi
test eax, eax
mov ebx, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
je 0x40ddd6
push 0x80
push esi
call ebx
mov edx, dword [ebp + 0x10]
mov eax, dword [esp + 0xc]
push edx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov edi, eax
test edi, edi
je 0x40ddf7
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x40ddf7
push eax
push esi
call ebx
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x110]
xor ecx, ebp
call fcn.0041277f
mov esp, ebp
pop ebp
ret
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [esp + 0x11c]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.0041277f
mov esp, ebp
pop ebp
ret

Function at 0x40de30
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x3c
mov edx, dword [esp + 0x48]
push edi
xor eax, eax
mov ecx, 0xf
lea edi, [esp + 4]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x48]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x54]
lea edx, [esp + 4]
push edx
mov dword [esp + 8], 0x3c
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], 1
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
pop edi
add esp, 0x3c
ret

Function at 0x40de90
Capabilities:
Check os version

Disassembly:
sub esp, 0x98
mov eax, dword [str._u]
xor eax, esp
mov dword [esp + 0x94], eax
lea eax, [esp]
push eax
mov dword [esp + 4], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x40dee2
cmp dword [esp + 0x10], 2
jne 0x40dee2
cmp dword [esp + 4], 6
jb 0x40dee2
mov eax, 1
mov ecx, dword [esp + 0x94]
xor ecx, esp
call fcn.0041277f
add esp, 0x98
ret
mov ecx, dword [esp + 0x94]
xor ecx, esp
xor eax, eax
call fcn.0041277f
add esp, 0x98
ret
Function at 0x40e470
Capabilities:
Get file size

Disassembly:
mov al, byte [ecx + 0x38]
test al, al
je 0x40e4bf
cmp dword [ecx + 0x34], 0x10
jb 0x40e482
mov ecx, dword [ecx + 0x20]
jmp 0x40e485
add ecx, 0x20
push esi
push edi
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
push edi
add esi, 0x1800
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
ret
mov eax, dword [ecx + 0x3c]
test eax, eax
je 0x40e4d3
mov ecx, dword [ecx + 0x40]
test ecx, ecx
lea eax, [ecx + 0x1800]
jne 0x40e4d8
mov eax, 0x2000
ret
Function at 0x413231
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.00413160
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4132cc
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 [0x422b7c]
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 0x4132cc
cmp eax, 1
je 0x4132ed
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 0x4132cc
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x413299
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x4132c8
xor eax, eax
inc eax
jmp 0x41330c
cmp edi, eax
jae 0x4132d0
xor eax, eax
jmp 0x41330c
cmp eax, esi
jae 0x4132d7
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 [0x422b7c]
jmp 0x4132f0
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 0x4135fd
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x41e020
call fcn.00413840
mov edi, 0x94
mov eax, edi
call fcn.00413160
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 [0x422b7c], ecx
mov eax, dword [esi + 4]
mov dword [0x422b88], eax
mov edx, dword [esi + 8]
mov dword [0x422b8c], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x422b80], esi
cmp ecx, 2
je 0x41365d
or esi, 0x8000
mov dword [0x422b80], esi
shl eax, 8
add eax, edx
mov dword [0x422b84], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x413698
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x413698
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x4136b0
cmp eax, 0x20b
je 0x41369d
mov dword [ebp - 0x1c], esi
jmp 0x4136c4
cmp dword [ecx + 0x84], 0xe
jbe 0x413698
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x4136be
cmp dword [ecx + 0x74], 0xe
jbe 0x413698
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.00413acf
pop ecx
test eax, eax
jne 0x4136d8
push 0x1c
call fcn.004135d9
pop ecx
call fcn.0041548c
test eax, eax
jne 0x4136e9
push 0x10
call fcn.004135d9
pop ecx
call fcn.0041995f
mov dword [ebp - 4], esi
call fcn.00419761
test eax, eax
jge 0x413702
push 0x1b
call fcn.004135b4
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x424238], eax
call fcn.0041963f
mov dword [0x4229c8], eax
call fcn.0041959d
test eax, eax
jge 0x413728
push 8
call fcn.004135b4
pop ecx
call fcn.0041936a
test eax, eax
jge 0x413739
push 9
call fcn.004135b4
pop ecx
push 1
call fcn.00414821
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x41374f
push eax
call fcn.004135b4
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0041930d
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x413770
movzx eax, word [ebp - 0x40]
jmp 0x413773
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00405f70
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x413791
push edi
call fcn.0041494e
call fcn.00414970
jmp 0x4137c3
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0041387b
ret
Function at 0x41388c
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 0x4138ba
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 0x4138c1
cmp ebx, dword [eax + 4]
jae 0x4138c1
xor eax, eax
jmp 0x413ab1
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x4138d2
xor eax, eax
inc eax
jmp 0x413ab0
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x4138e8
cmp ecx, edx
jae 0x413a2d
cmp dword [eax + 4], 0
je 0x4138f1
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x4138d9
cmp dword [ebp + 8], 0
je 0x413913
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x413a2d
cmp eax, esi
jae 0x413a2d
mov eax, dword [0x4229d8]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x413938
cmp dword [esi*4 + 0x4229e0], edi
je 0x413a31
inc esi
cmp esi, eax
jl 0x413926
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x413aad
cmp dword [ebp - 8], 0x1000000
jne 0x413aad
test byte [ebp - 0xc], 0xcc
je 0x4139b6
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x413aad
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x413aad
cmp word [eax + 0x18], 0x10b
jne 0x413aad
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x413aad
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x4139b6
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x4139b6
test byte [ecx + 0x27], 0x80
jne 0x413a2d
push 1
push 0x422a20
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x4138ca
mov ecx, dword [0x4229d8]
test ecx, ecx
mov edx, ecx
jle 0x4139ea
lea eax, [ecx*4 + 0x4229dc]
cmp dword [eax], edi
je 0x4139ea
dec edx
sub eax, 4
test edx, edx
jg 0x4139de
test edx, edx
jne 0x413a1b
push 0xf
pop ebx
cmp ecx, ebx
jg 0x4139f7
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x413a0f
lea eax, [edx*4 + 0x4229e0]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x4139fd
cmp ecx, 0x10
jge 0x413a1b
inc ecx
mov dword [0x4229d8], ecx
push 0
push 0x422a20
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x4138ca
xor eax, eax
jmp 0x413ab0
test esi, esi
jle 0x4138ca
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x422a20
call ebx
test eax, eax
jne 0x4138ca
cmp dword [esi*4 + 0x4229e0], edi
je 0x413a87
mov eax, dword [0x4229d8]
lea esi, [eax - 1]
test esi, esi
jl 0x413a75
cmp dword [esi*4 + 0x4229e0], edi
je 0x413a71
dec esi
jns 0x413a65
test esi, esi
jge 0x413a85
cmp eax, 0x10
jge 0x413a80
inc eax
mov dword [0x4229d8], eax
lea esi, [eax - 1]
jmp 0x413a87
je 0x413a9f
xor ecx, ecx
test esi, esi
jl 0x413a9f
lea eax, [ecx*4 + 0x4229e0]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x413a8d
push 0
push 0x422a20
call ebx
jmp 0x4138ca
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x41488b
Capabilities:
Terminate process

Disassembly:
push 8
push 0x41e058
call fcn.00413840
push 8
call fcn.00413c73
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x422bbc], esi
jne 0x4148bf
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x422bb8], esi
mov al, byte [ebp + 0x10]
mov byte [0x422bb4], al
cmp dword [ebp + 0xc], edi
jne 0x414909
cmp dword [0x42420c], edi
je 0x4148f9
mov eax, dword [0x424208]
sub eax, 4
mov dword [0x424208], eax
cmp eax, dword [0x42420c]
jb 0x4148f9
mov eax, dword [eax]
cmp eax, edi
je 0x4148da
call eax
jmp 0x4148da
push 0x421044
mov eax, 0x42103c
call fcn.00414809
pop ecx
push 0x421050
mov eax, 0x421048
call fcn.00414809
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x41493a
cmp dword [ebp + 0x10], edi
jne 0x414948
mov dword [0x422bbc], esi
push dword [ebp + 8]
call fcn.004147c7
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x414947
push 8
call fcn.00413bbe
pop ecx
ret
call fcn.0041387b
ret

Function at 0x41915c
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [str._u]
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 + 0x422098]
je 0x419193
inc eax
cmp eax, 0x13
jb 0x419184
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x422098]
jne 0x4192b6
mov eax, dword [0x4229d0]
cmp eax, 1
je 0x419291
cmp eax, edx
jne 0x4191c3
cmp dword [0x421818], 1
je 0x419291
cmp ecx, 0xfc
je 0x4192b6
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 0x4191f9
lea eax, [ebp - 0x7c]
push str._program_name_unknown_
push eax
call fcn.004156a0
pop ecx
pop ecx
lea edi, [ebp - 0x7c]
mov eax, edi
push eax
call fcn.004157a0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x41922d
mov eax, edi
push eax
call fcn.004157a0
mov edi, eax
lea eax, [ebp - 0x7c]
sub eax, 0x3b
push 3
add edi, eax
push 0x41e164
push edi
call fcn.00412bd0
add esp, 0x10
push edi
call fcn.004157a0
push dword [esi + 0x42209c]
mov ebx, eax
call fcn.004157a0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00413160
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.004156a0
push edi
push ebx
call fcn.004156b0
push 0x41e160
push ebx
call fcn.004156b0
push dword [esi + 0x42209c]
push ebx
call fcn.004156b0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00419aea
add esp, 0x2c
jmp 0x4192b6
push edx
lea eax, [ebp - 0x80]
push eax
lea esi, [esi + 0x42209c]
push dword [esi]
call fcn.004157a0
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.0041277f
add ebp, 0x90
leave
ret