joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40ac20
Capabilities:
Get user security identifier

Disassembly:
sub esp, 0x70
mov eax, dword [0x41f608]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push 0x60
push 0
mov dword [esp + 0x7c], eax
mov dword [esp + 0x14], 0x10
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], 0x60
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
jne 0x40ac72
pop esi
xor al, al
pop ebp
mov ecx, dword [esp + 0x6c]
call fcn.0040e486
jmp loc.004e38c0
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_LookupAccountNameA]
push edi
mov edi, dword [esp + 0x8c]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x64]
push edx
lea eax, [esp + 0x1c]
push eax
push esi
push edi
push 0
call ebx
test eax, eax
jne 0x40acf3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40add9
mov ecx, dword [esp + 0x10]
push ecx
push esi
push 0
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov esi, eax
test esi, esi
je 0x40ade5
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x64]
push ecx
lea edx, [esp + 0x1c]
push edx
push esi
push edi
push 0
mov dword [esp + 0x30], 0x10
call ebx
test eax, eax
je 0x40add9
push esi
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov edi, eax
add edi, 0x10
push edi
push 0
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x40add9
push 2
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x40adcc
push esi
push 0x10000000
push 2
push ebx
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x40adcc
push 1
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x40adcc
xor edi, edi
push edi
push ebx
push 1
lea ecx, [esp + 0x54]
push ecx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x40adce
mov edx, dword [esp + 0x88]
mov eax, dword [esp + 0x84]
push edi
mov dword [esp + 0x24], edx
lea edx, [esp + 0x24]
push edx
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x98]
push 0x1f6
lea ecx, [esp + 0x54]
push eax
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], 0x7f
mov dword [esp + 0x40], 0xffffffff
mov dword [esp + 0x44], edi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], ecx
call sub.NETAPI32.dll_NetShareAdd
test eax, eax
jne 0x40adce
mov dword [esp + 0x18], 1
jmp 0x40adce
xor edi, edi
push ebx
push edi
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
push 0
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x7c]
pop edi
pop ebx
test eax, eax
pop esi
setne al
pop ebp
call fcn.0040e486
add esp, 0x70
ret 0x10
Function at 0x40b350
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x46c
mov eax, dword [0x41f608]
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push edi
mov dword [esp + 0x474], eax
mov dword [esp + 0xc], ecx
xor eax, eax
xor bl, bl
mov byte [esp + 0x18], bl
mov ecx, 0x40
lea edi, [esp + 0x19]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 8]
push eax
lea ecx, [esp + 0x1c]
push ecx
call esi
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov cl, byte [esp + eax + 0x17]
cmp cl, 0x5c
lea eax, [esp + eax + 0x18]
je 0x40b3b1
mov byte [eax], 0x5c
xor eax, eax
mov byte [esp + 0x228], bl
mov ecx, 0x40
jmp loc.004dd8a8

Function at 0x40b650
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x318
mov eax, dword [0x41f608]
push esi
push edi
mov dword [esp + 0x31c], eax
mov esi, ecx
xor eax, eax
mov word [esp + 0x110], 0
mov ecx, 0x81
lea edi, [esp + 0x112]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x104
lea eax, [esp + 0x114]
push eax
push 0x418850
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x40b6b7
push 0x418808
lea ecx, [esp + 0x114]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0
push str.everyone
push 0x418bf4
lea edx, [esp + 0x11c]
push edx
mov ecx, esi
call fcn.0040ac20
xor eax, eax
mov byte [esp + 8], 0
mov ecx, 0x40
lea edi, [esp + 9]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x104
lea eax, [esp + 0xc]
push eax
push str.ALLUSERSPROFILE
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
jne 0x40b710
push str.C:Documents_and_SettingsAll_Users
lea ecx, [esp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x10000000
jmp 0x4e5b20

Function at 0x40b7a0
Capabilities:
Get cpu information
Query or enumerate registry value

Disassembly:
sub esp, 0xc
lea eax, [esp + 4]
push eax
push 1
push 0
push str.HARDWAREDESCRIPTIONSystemCentralProcessor0
push 0x80000002
mov dword [esp + 0x14], 0x50
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov eax, dword [esp + 4]
lea ecx, [esp]
push ecx
lea edx, [esp + 0xc]
push edx
push 0
jmp loc.004e3e38

Function at 0x40b800
Capabilities:
Get local ipv4 addresses

Disassembly:
mov eax, 0x2808
call fcn.0040ee00
mov eax, dword [0x41f608]
push esi
mov dword [esp + 0x2808], eax
push edi
lea eax, [esp + 8]
push eax
lea ecx, [esp + 0x10]
push ecx
mov dword [esp + 0x10], 0x2800
call sub.iphlpapi.dll_GetAdaptersInfo
movzx eax, byte [esp + 0x1a2]
movzx ecx, byte [esp + 0x1a3]
movzx edi, byte [esp + 0x1a5]
movzx edx, byte [esp + 0x1a4]
mov esi, eax
shl esi, 8
push edi
add esi, ecx
push edx
push ecx
mov ecx, dword [esp + 0x2820]
shl esi, 8
add esi, edx
movzx edx, byte [esp + 0x1ad]
push eax
movzx eax, byte [esp + 0x1b0]
push edx
push eax
push str._02X_02X_02X_02X_02X_02X
shl esi, 8
push ecx
add esi, edi
call fcn.0040e494
mov ecx, dword [esp + 0x282c]
add esp, 0x20
pop edi
mov eax, esi
pop esi
call fcn.0040e486
add esp, 0x2808
ret
Function at 0x40b8b0
Capabilities:
Get memory capacity

Disassembly:
sub esp, 0x20
lea eax, [esp]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatus]
jmp loc.004e0210

Function at 0x40bba0
Capabilities:
Get proxy
Query or enumerate registry value

Disassembly:
sub esp, 0x110
mov eax, dword [0x41f608]
mov dword [esp + 0x10c], eax
lea eax, [esp]
push eax
push 1
push 0
push 0x418cdc
push 0x80000001
mov dword [esp + 0x18], 4
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40bbec
or eax, 0xffffffff
mov ecx, dword [esp + 0x10c]
call fcn.0040e486
add esp, 0x110
ret
mov eax, dword [esp]
push esi
jmp loc.004e35a0

Function at 0x40bcd0
Capabilities:
Get proxy
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x248
mov eax, dword [0x41f608]
push esi
push edi
mov dword [esp + 0x24c], eax
xor eax, eax
mov byte [esp + 0x18], 0
mov ecx, 0x4a
lea edi, [esp + 0x19]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [esp + 0x1c]
push ecx
mov dword [esp + 0x14], 4
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push str.SoftwareMicrosoftWindowsCurrentVersionInternet_Settings
lea edx, [esp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [esp + 0x10]
push eax
push 1
push 0
lea ecx, [esp + 0x24]
push ecx
push 0x80000003
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40be0d
mov ecx, dword [esp + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea edx, [esp + 0xc]
push edx
lea eax, [esp + 0x18]
push eax
push 0
push 0
push str.ProxyEnable
push ecx
call esi
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0xc]
push edx
mov edi, eax
lea eax, [esp + 0x14c]
push eax
push 0
push 0
push str.ProxyServer
push ecx
mov dword [esp + 0x24], pe_nt_image_headers32
call esi
mov edx, dword [esp + 0x10]
push edx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
jne 0x40be0d
test esi, esi
jne 0x40be0d
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40be0d
lea eax, [esp + 0x148]
push 0x418d40
push eax
call fcn.0040f130
mov esi, eax
add esp, 8
test esi, esi
je 0x40bdcb
add esi, 5
jmp 0x40bdd2
jmp loc.004def50
push 0x3a
push esi
call fcn.0040f070
mov edi, dword [ebp + 8]
add esp, 8
mov byte [eax], 0
mov ecx, esi
sub edi, esi
mov dl, byte [ecx]
mov byte [edi + ecx], dl
inc ecx
test dl, dl
jne 0x40bde7
inc eax
push eax
call fcn.0040e9ea
add esp, 4
mov ecx, dword [esp + 0x24c]
call fcn.0040e486
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x24c]
or eax, 0xffffffff
call fcn.0040e486
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40be30
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x26c
mov eax, dword [0x41f608]
push ebx
push esi
push edi
mov dword [esp + 0x274], eax
xor eax, eax
mov byte [esp + 0x38], 0
mov ecx, 0x40
lea edi, [esp + 0x39]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x38]
push edx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x28]
push ecx
xor esi, esi
push esi
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x60]
push eax
push 0x80000003
mov dword [esp + 0x40], 0x104
mov dword [esp + 0x3c], esi
or edi, 0xffffffff
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
mov eax, dword [esp + 0xc]
cmp eax, esi
je 0x40bf0f
jbe 0x40bf0f
jmp loc.004e6de0
mov ecx, dword [esp + 0x274]
mov eax, edi
call fcn.0040e486
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40c3b0
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 8
push esi
mov esi, ecx
mov al, byte [esi + 0x38]
mov ecx, dword [esi + 0x34]
test al, al
push edi
mov eax, 0x10
je 0x40c4cc
cmp ecx, eax
jb 0x40c3d3
mov ecx, dword [esi + 0x20]
jmp 0x40c3d6
lea ecx, [esi + 0x20]
cmp dword [esi + 0x18], eax
jb 0x40c3e0
mov eax, dword [esi + 4]
jmp 0x40c3e3
lea eax, [esi + 4]
mov edi, dword [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x18]
push ecx
push eax
push edi
push str.___s_r_nContent_Disposition:_form_data__name__s___filename__s__r_n_r_n
push ebp
call fcn.0040e494
mov eax, edi
add esp, 0x14
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40c402
mov ecx, dword [esi + 0x30]
sub eax, edx
add ecx, dword [esi + 0x14]
push ebx
lea ebx, [ecx + eax + 0x3c]
cmp dword [esi + 0x34], 0x10
mov dword [esp + 0x14], ebx
jb 0x40c425
mov esi, dword [esi + 0x20]
jmp 0x40c428
add esi, 0x20
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
xor esi, esi
cmp edi, esi
je 0x40c520
cmp edi, 0xffffffff
je 0x40c520
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
lea edx, [esp + 0x28]
push edx
push 0x400
add ebx, ebp
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
push edi
mov dword [esp + 0x24], eax
mov dword [esp + 0x38], esi
call ebp
test eax, eax
je 0x40c4a8
mov eax, dword [esp + 0x24]
test eax, eax
jbe 0x40c4a8
cmp esi, dword [esp + 0x10]
ja 0x40c4a8
push 0
add esi, eax
lea eax, [esp + 0x28]
push eax
push 0x400
lea ecx, [esi + ebx]
push ecx
push edi
call ebp
test eax, eax
jne 0x40c481
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
add esi, edx
push edi
mov word [esi + eax], 0xa0d
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
pop ebp
pop edi
lea eax, [esi + 2]
pop esi
add esp, 8
ret 0xc
cmp ecx, eax
jb 0x40c4d5
mov ecx, dword [esi + 0x20]
jmp 0x40c4d8
lea ecx, [esi + 0x20]
cmp dword [esi + 0x18], eax
jb 0x40c4e2
mov eax, dword [esi + 4]
jmp 0x40c4e5
lea eax, [esi + 4]
mov edi, dword [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x18]
push eax
push edi
push str.___s_r_nContent_Disposition:_form_data__name__s__r_n_r_n_s_r_n
push ecx
call fcn.0040e494
mov eax, edi
add esp, 0x14
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40c503
mov ecx, dword [esi + 0x14]
sub eax, edx
mov edx, dword [esi + 0x30]
add edx, ecx
pop edi
lea eax, [edx + eax + 0x31]
pop esi
add esp, 8
ret 0xc
mov eax, ebx
pop ebx
pop ebp
pop edi
pop esi
add esp, 8
ret 0xc

Function at 0x40c5b0
Capabilities:
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4176f0
jmp loc.004e7eb6

Function at 0x40c920
Capabilities:
Get file size

Disassembly:
sub esp, 8
mov eax, dword [ecx + 0x90]
xor edx, edx
test eax, eax
mov dword [esp + 4], ecx
mov dword [esp], edx
jbe 0x40c9c8
mov eax, dword [ecx + 0x8c]
push ebx
mov ebx, dword [eax]
cmp ebx, eax
je 0x40c9c1
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_CreateFileA]
push esi
push edi
mov eax, edx
pop ebx
add esp, 8
ret
mov eax, edx
add esp, 8
ret
Function at 0x40f470
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x419040
call fcn.00410fb0
mov edi, 0x94
mov eax, edi
call fcn.0040ee00
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 [0x421090], ecx
mov eax, dword [esi + 4]
mov dword [0x42109c], eax
mov edx, dword [esi + 8]
mov dword [0x4210a0], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x421094], esi
cmp ecx, 2
je 0x40f4d0
or esi, 0x8000
mov dword [0x421094], esi
shl eax, 8
add eax, edx
mov dword [0x421098], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x40f50b
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40f50b
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40f523
cmp eax, 0x20b
je 0x40f510
mov dword [ebp - 0x1c], esi
jmp 0x40f537
cmp dword [ecx + 0x84], 0xe
jbe 0x40f50b
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x40f531
cmp dword [ecx + 0x74], 0xe
jbe 0x40f50b
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.0041020c
pop ecx
test eax, eax
jne 0x40f563
cmp dword [0x421080], 1
jne 0x40f550
call fcn.0041383e
push 0x1c
call fcn.004136c7
push 0xff
call fcn.0040ffe5
pop ecx
pop ecx
call fcn.00413fe7
mov dword [ebp - 4], esi
call fcn.00413e3c
test eax, eax
jge 0x40f57c
push 0x1b
call fcn.0040f44b
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x4226b8], eax
call fcn.00413d1a
mov dword [0x421078], eax
call fcn.00413c78
test eax, eax
jge 0x40f5a2
push 8
jmp 0x4e14d0
call fcn.00413a45
test eax, eax
jge 0x40f5b3
push 9
call fcn.0040f44b
pop ecx
push 1
call fcn.00410015
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x40f5c9
push eax
call fcn.0040f44b
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.004139e8
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x40f5ea
movzx eax, word [ebp - 0x40]
jmp 0x40f5ed
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00402900
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40f60b
push edi
call fcn.00410140
call fcn.00410162
jmp 0x40f63d
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00410feb
ret
Function at 0x40f94e
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x421540]
mov eax, dword [0x41f608]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x40fb14
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x421560]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x80], ebx
je 0x40fb14
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x40f9b8
xor eax, eax
jmp 0x40fb28
test al, 0x20
je 0x40f9c9
push 2
push edi
push edi
push ecx
call fcn.004143e6
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40fa9e
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x40fae5
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x40fa2b
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40fa1c
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x80]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x40f9fe
mov edi, eax
lea eax, [ebp - 0x6c]
sub edi, eax
push 0
lea eax, [ebp - 0x78]
push eax
push edi
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40fa6b
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x40fa77
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x40f9f2
jmp 0x40fa79
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x40fb0f
cmp dword [ebp + 0x3a4], edi
je 0x40fae5
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x40fad7
mov dword [0x421088], eax
jmp 0x40fb1b
push edi
lea ecx, [ebp - 0x78]
push ecx
push dword [ebp + 0x3ac]
push dword [ebp + 0x3a8]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40fac9
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x40fa79
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x40fa79
push dword [ebp + 0x3a4]
call fcn.0041406f
pop ecx
jmp 0x40fb25
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40fafd
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x40f9b1
mov dword [0x421084], 0x1c
mov dword [0x421088], edi
jmp 0x40fb25
sub eax, dword [ebp - 0x7c]
jmp 0x40fb28
jmp 0x4db008
mov dword [0x421084], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.0040e486
add ebp, 0x39c
leave
ret
Function at 0x41007f
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x4210d0], esi
push edi
jne 0x41009f
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x4210cc], esi
mov byte [0x4210c8], al
jne 0x410105
mov ecx, dword [0x4226b0]
test ecx, ecx
je 0x4100e6
mov eax, dword [0x4226ac]
sub eax, 4
cmp eax, ecx
jmp 0x4100df
mov eax, dword [eax]
test eax, eax
je 0x4100d1
call eax
mov eax, dword [0x4226ac]
sub eax, 4
cmp eax, dword [0x4226b0]
mov dword [0x4226ac], eax
jae 0x4100c9
mov eax, 0x41c024
mov esi, 0x41c02c
cmp eax, esi
mov edi, eax
jae 0x410105
mov eax, dword [edi]
test eax, eax
je 0x4100fe
call eax
add edi, 4
cmp edi, esi
jb 0x4100f6
mov eax, 0x41c030
mov esi, 0x41c038
cmp eax, esi
mov edi, eax
jae 0x410124
mov eax, dword [edi]
test eax, eax
je 0x41011d
call eax
add edi, 4
cmp edi, esi
jb 0x410115
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x41013e
push dword [ebp + 8]
mov dword [0x4210d0], 1
call fcn.0040ffe5
pop ebp
ret

Function at 0x4123e8
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
jmp loc.004dfb08

Function at 0x4136c7
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x41f608]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x41f948]
je 0x4136fc
inc eax
cmp eax, 0x13
jb 0x4136ed
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x41f948]
jne 0x413822
mov eax, dword [0x421080]
cmp eax, 1
je 0x4137fa
cmp eax, edx
jne 0x41372c
cmp dword [0x41f670], 1
je 0x4137fa
cmp ecx, 0xfc
je 0x413822
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x413762
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.004130e0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.004131e0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x413796
mov eax, edi
push eax
call fcn.004131e0
mov edi, eax
lea eax, [ebp - 0x80]
jmp 0x4dcb60
push edi
call fcn.004131e0
push dword [esi + 0x41f94c]
mov ebx, eax
call fcn.004131e0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.0040ee00
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.004130e0
push edi
push ebx
call fcn.004130f0
push 0x41909c
push ebx
call fcn.004130f0
push dword [esi + 0x41f94c]
push ebx
call fcn.004130f0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00414811
add esp, 0x2c
jmp 0x413822
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x41f94c]
push dword [esi]
call fcn.004131e0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.0040e486
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x414811
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x421278], ebx
push esi
push edi
jne 0x414891
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x4148cc
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x421278], eax
je 0x4148cc
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x42127c], eax
call esi
cmp dword [0x421090], 2
mov dword [0x421280], eax
jne 0x414891
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x421288], eax
je 0x414891
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x421284], eax
mov eax, dword [0x421284]
test eax, eax
je 0x4148d6
call eax
test eax, eax
je 0x4148bd
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x421288]
test eax, eax
je 0x4148bd
test byte [ebp - 8], 1
jne 0x4148d6
jmp 0x4e3f00
xor eax, eax
jmp 0x414905
mov eax, dword [0x42127c]
test eax, eax
je 0x4148f5
call eax
mov ebx, eax
test ebx, ebx
je 0x4148f5
mov eax, dword [0x421280]
test eax, eax
je 0x4148f5
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x421278]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4159b7
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1008
call fcn.0040ee00
mov eax, dword [0x41f608]
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
cmp ebx, dword [0x421540]
mov dword [ebp - 4], eax
jae 0x415afa
mov eax, ebx
sar eax, 5
mov eax, dword [eax*4 + 0x421560]
mov ecx, ebx
and ecx, 0x1f
test byte [eax + ecx*8 + 4], 1
je 0x415afa
push 1
push esi
push ebx
call fcn.004142ef
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 0x1008], eax
je 0x415b04
push 2
push esi
push ebx
call fcn.004142ef
add esp, 0xc
cmp eax, 0xffffffff
je 0x415b04
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x415aa4
push 0x1000
lea eax, [ebp - 0x1004]
push esi
push eax
call fcn.00410da0
push 0x8000
push ebx
call fcn.0041709a
add esp, 0x14
mov dword [ebp + 8], eax
mov eax, 0x1000
cmp edi, eax
jge 0x415a63
mov eax, edi
push eax
lea eax, [ebp - 0x1004]
push eax
push ebx
call fcn.0040f94e
add esp, 0xc
cmp eax, 0xffffffff
je 0x415a81
jmp 0x4ddfb0
cmp dword [0x421088], 5
jne 0x415a94
mov dword [0x421084], 0xd
or esi, 0xffffffff
push dword [ebp + 8]
push ebx
call fcn.0041709a
pop ecx
pop ecx
jmp 0x415ae4
jge 0x415ae4
push 0
push dword [ebp + 0xc]
push ebx
call fcn.004142ef
push ebx
call fcn.0041425c
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, 0xffffffff
jne 0x415ae4
mov dword [0x421084], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x421088], eax
push 0
push dword [ebp - 0x1008]
push ebx
call fcn.004142ef
add esp, 0xc
mov eax, esi
pop edi
jmp 0x415b07
mov dword [0x421084], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.0040e486
leave
ret