joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401500
Capabilities:
Hide graphical window

Disassembly:
sub esp, 0x30
push esi
push edi
push 0x7f00
mov esi, eax
push 0
mov dword [esp + 0x10], 0x30
mov dword [esp + 0x14], 3
mov dword [esp + 0x18], 0x4014b0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], esi
call dword [sym.imp.USER32.dll_LoadIconW]
push 0x7f00
push 0
mov dword [esp + 0x28], eax
call dword [sym.imp.USER32.dll_LoadCursorW]
push 0
mov dword [esp + 0x28], eax
call dword [sym.imp.GDI32.dll_GetStockObject]
mov edi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0
push 0x32
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], str.MainMenu
mov dword [esp + 0x38], str.MainWClass
call edi
push eax
push 0x31
call edi
push eax
push 1
push 5
push esi
call dword [sym.imp.USER32.dll_LoadImageW]
mov dword [esp + 0x34], eax
lea eax, [esp + 8]
push eax
call dword [sym.imp.USER32.dll_RegisterClassExW]
test ax, ax
je 0x4015f2
push 0
push esi
push 0
push 0
push 0x80000000
push 0x80000000
push 0x80000000
push 0x80000000
push 0xcf0000
push 0x40a284
push str.MainWClass
push 0
call dword [sym.imp.USER32.dll_CreateWindowExW]
mov esi, eax
test esi, esi
je 0x4015f2
push 0
push esi
call dword [sym.imp.USER32.dll_ShowWindow]
push esi
call dword [sym.imp.USER32.dll_UpdateWindow]
pop edi
mov al, 1
pop esi
add esp, 0x30
ret
pop edi
xor al, al
pop esi
add esp, 0x30
ret
Function at 0x401680
Capabilities:
Acquire debug privileges

Disassembly:
sub esp, 0x1c
push ebx
mov ebx, dword [esp + 0x2c]
push esi
push edi
mov edi, str.install
mov esi, ebx
mov ecx, 8
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x4016aa
call fcn.00402b10
pop edi
pop esi
pop ebx
add esp, 0x1c
ret 0x10
mov edi, 0x40a330
mov esi, ebx
mov ecx, 7
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4016ca
call fcn.00402b80
pop edi
pop esi
pop ebx
add esp, 0x1c
ret 0x10
push ebp
call fcn.00401860
mov ebp, eax
test ebp, ebp
je 0x4016dd
mov ecx, ebp
call fcn.00401980
lea eax, [esp + 0x18]
push eax
call fcn.00402d40
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x20]
push eax
push str._d__d__d
push ebx
call fcn.00402e80
add esp, 0x18
cmp eax, 3
je 0x40172e
push 0x40
push 0xc9
push 0xca
push 0
call section..text
add esp, 0x10
pop ebp
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x1c
ret 0x10
mov eax, dword [esp + 0x30]
call fcn.00401500
push 2
push str.SeDebugPrivilege
call fcn.00401600
push 2
push str.SeBackupPrivilege
call fcn.00401600
push 2
push str.SeRestorePrivilege
call fcn.00401600
mov ecx, dword [esp + 0x2c]
add esp, 0x18
push 0x2101c
push 0
push 0
push 0xf001f
push ecx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebx, eax
test ebx, ebx
jne 0x4017a2
push 0x40
push 0xc9
push 0xcb
push 1
call section..text
add esp, 0x10
pop ebp
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x1c
ret 0x10
mov edx, dword [esp + 0x38]
mov esi, dword [sym.imp.KERNEL32.dll_SetEvent]
push edx
call esi
mov ecx, dword [esp + 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor eax, eax
mov dword [esp + 0x20], eax
push 0xdbba0
mov dword [esp + 0x28], eax
push ecx
mov dword [esp + 0x24], 0
mov dword [esp + 0x30], eax
call edi
test eax, eax
jne 0x401802
jmp 0x4017e0
lea eax, [esp + 0x1c]
mov ecx, ebx
call fcn.00401150
mov edx, dword [esp + 0x38]
push edx
call esi
mov eax, dword [esp + 0x10]
push 0xdbba0
push eax
call edi
test eax, eax
je 0x4017e0
test ebp, ebp
je 0x40180d
mov ecx, ebp
call fcn.00401950
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x1c
ret 0x10

Function at 0x402000
Capabilities:
Delete file
Get common file path

Disassembly:
sub esp, 0x228
push 0x113
lea eax, [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x402083
cmp eax, 0x100
jge 0x402083
lea ecx, [esp]
push 0x40a3f4
push ecx
call fcn.00402dde
lea edx, [esp + 8]
push 0x40a3cc
push edx
call fcn.00402dde
add esp, 0x10
lea eax, [esp]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40207a
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x402066
call esi
pop esi
add esp, 0x228
ret
call esi
and eax, 0xffff
or eax, 0x80070000
pop esi
add esp, 0x228
ret
xor eax, eax
add esp, 0x228
ret
mov eax, 0x80070003
add esp, 0x228
ret
Function at 0x402090
Capabilities:
Delete service
Stop service

Disassembly:
sub esp, 0x1c
push esi
push edi
push 0xf003f
xor esi, esi
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
je 0x402111
push ebx
push ebp
push 0x10024
push 0x40a3f8
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebp, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebx, eax
test ebx, ebx
je 0x4020fb
lea eax, [esp + 0x10]
push eax
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_ControlService]
push ebx
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x4020f8
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4020f6
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
push ebx
call ebp
push edi
call ebp
call fcn.00402000
test esi, esi
pop ebp
pop ebx
je 0x40210b
mov eax, esi
pop edi
pop esi
add esp, 0x1c
ret
pop edi
mov eax, 0x80004005
pop esi
add esp, 0x1c
ret

Function at 0x402230
Capabilities:
Create process on windows
Query environment variable
Self delete
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x10820
call fcn.00402e30
push esi
push edi
xor eax, eax
mov word [esp + 0x828], 0
mov ecx, 0x3fff
lea edi, [esp + 0x82a]
rep stosd dword es:[edi], eax
push 0x104
lea eax, [esp + 0x82c]
push eax
push str.ComSpec
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp word [esp + 0x828], 0
jne 0x4022dd
xor eax, eax
mov ecx, 0x44
lea edi, [esp + 0xc]
rep stosd dword es:[edi], eax
lea ecx, [esp + 8]
push ecx
mov dword [esp + 0xc], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x4022ce
cmp dword [esp + 0x18], 2
jne 0x4022b9
push str.cmd.exe
lea edx, [esp + 0x82c]
push edx
jmp 0x4022c6
push str.command.com
lea eax, [esp + 0x82c]
push eax
call fcn.00402e08
add esp, 8
cmp word [esp + 0x828], 0
je 0x402380
mov word [esp + 8], 0
xor eax, eax
mov ecx, 0x81
lea edi, [esp + 0xa]
rep stosd dword es:[edi], eax
push 0x104
lea ecx, [esp + 0xc]
push ecx
push 0
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x402314
call fcn.00402120
mov esi, eax
test esi, esi
jne 0x40231c
xor al, al
pop edi
pop esi
mov esp, ebp
pop ebp
ret
xor eax, eax
mov word [esp + 0x210], 0
mov ecx, 0x185
lea edi, [esp + 0x212]
rep stosd dword es:[edi], eax
push esi
lea edx, [esp + 0xc]
push edx
stosw word es:[edi], ax
lea eax, [esp + 0x218]
push str._c_del___s___rmdir___s_
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
push esi
call fcn.00402da6
add esp, 0x14
push 0
push 0
lea ecx, [esp + 0x218]
push ecx
lea edx, [esp + 0x834]
push edx
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop edi
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x402390
Capabilities:
Set registry value

Disassembly:
sub esp, 8
lea eax, [esp + 4]
push eax
push 4
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstall
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x402549
mov edx, dword [esp + 4]
push edi
push eax
lea ecx, [esp + 8]
push ecx
push eax
push 2
push eax
push eax
push eax
push str.Sophos_AntiRootkit
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov edi, eax
test edi, edi
jne 0x40253b
push esi
push str.Sophos_Plc
call fcn.0040341e
mov ecx, dword [esp + 0xc]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
add esp, 4
lea eax, [eax + eax + 2]
push eax
push str.Sophos_Plc
push 1
push edi
push str.Publisher
push ecx
call esi
push str.http:__www.sophos.com_
call fcn.0040341e
add esp, 4
lea edx, [eax + eax + 2]
mov eax, dword [esp + 8]
push edx
push str.http:__www.sophos.com_
push 1
push edi
push str.HelpLink
push eax
call esi
push str.1.5.23
call fcn.0040341e
mov edx, dword [esp + 0xc]
add esp, 4
lea ecx, [eax + eax + 2]
push ecx
push str.1.5.23
push 1
push edi
push str.DisplayVersion
push edx
call esi
push str.Sophos_Anti_Rootkit_1.5.23
call fcn.0040341e
mov ecx, dword [esp + 0xc]
add esp, 4
lea eax, [eax + eax + 2]
push eax
push str.Sophos_Anti_Rootkit_1.5.23
push 1
push edi
push str.DisplayName
push ecx
call esi
mov edi, eax
test edi, edi
jne 0x40252f
push ebp
call fcn.00402120
mov ebp, eax
test ebp, ebp
jne 0x40249a
mov edi, 8
jmp 0x40252e
push 0
push str.helper.exe_remove
push ebp
call fcn.00402190
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x4024b7
mov edi, 8
jmp 0x402525
push ebx
push edi
call fcn.0040341e
add esp, 4
lea edx, [eax + eax + 2]
mov eax, dword [esp + 0x10]
push edx
push edi
push 1
push 0
push str.UninstallString
push eax
call esi
push edi
call fcn.00402da6
push 0
push str._sargui.exe
push ebp
call fcn.00402190
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x4024fa
mov edi, 8
jmp 0x402524
push ebx
call fcn.0040341e
mov edx, dword [esp + 0x14]
add esp, 4
lea ecx, [eax + eax + 2]
push ecx
push ebx
push 1
push 0
push str.DisplayIcon
push edx
call esi
push ebx
mov edi, eax
call fcn.00402da6
add esp, 4
pop ebx
push ebp
call fcn.00402da6
add esp, 4
pop ebp
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
pop edi
add esp, 8
ret
Function at 0x402550
Capabilities:
Delete registry key
Print debug messages

Disassembly:
push ecx
lea eax, [esp]
push eax
push 4
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstall
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4025b7
push esi
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstallSophos_AntiRootkit
call esi
mov ecx, dword [esp + 4]
push str.Sophos_AntiRootkit
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
jne 0x4025a4
push str.___deleted_add_remove_registry_key_n
call esi
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ecx
ret
push str.___NOT_deleted_add_remove_registry_key_n
call esi
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ecx
ret

Function at 0x4025c0
Capabilities:
Delete registry key
Print debug messages

Disassembly:
push ecx
lea eax, [esp]
push eax
push 4
push 0
push str.SYSTEMCurrentControlSetServicesEventlogSystem
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40261c
mov ecx, dword [esp]
push 0x40a3f8
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
jne 0x402607
push str.___deleted_event_log_registry_key_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov edx, dword [esp]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ecx
ret
push str.___NOT_deleted_event_log_registry_key_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov edx, dword [esp]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ecx
ret

Function at 0x402620
Capabilities:
Create process on windows

Disassembly:
push ebx
push edi
xor ebx, ebx
call fcn.00402120
mov edi, eax
test edi, edi
jne 0x402637
pop edi
mov eax, 8
pop ebx
ret
push esi
push edi
call fcn.0040341e
push str._sargui.exe
mov esi, eax
call fcn.0040341e
add esp, 8
add esi, eax
je 0x4026b7
lea eax, [esi + esi + 2]
push eax
call fcn.0040340c
mov esi, eax
add esp, 4
test esi, esi
je 0x4026b7
push 0x40a284
push esi
call fcn.00402e08
push edi
push esi
call fcn.00402dde
push str._sargui.exe
push esi
call fcn.00402dde
add esp, 0x18
push 1
push 0
push 0
push esi
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
cmp eax, 0x20
jg 0x40269f
mov ebx, 1
push esi
call fcn.00402da6
add esp, 4
push edi
call fcn.00402da6
add esp, 4
pop esi
pop edi
mov eax, ebx
pop ebx
ret
push edi
mov ebx, 8
call fcn.00402da6
add esp, 4
pop esi
pop edi
mov eax, ebx
pop ebx
ret
Function at 0x4026d0
Capabilities:
Delete file
Print debug messages

Disassembly:
push ebx
call fcn.00402120
mov ebx, eax
test ebx, ebx
je 0x402750
mov eax, dword [str.MEMSWEEP.sys]
push ebp
xor ebp, ebp
test eax, eax
je 0x402746
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, 0x40d048
mov eax, dword [eax]
push eax
push 0x40a3f4
push ebx
call fcn.00402190
mov esi, eax
add esp, 0xc
test esi, esi
je 0x402731
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x402721
push str.___deleted_file_n
jmp 0x402726
push str.___NOT_deleted_file_n
call edi
push esi
call fcn.00402da6
add esp, 4
inc ebp
mov ecx, dword [ebp*4 + 0x40d048]
test ecx, ecx
lea eax, [ebp*4 + 0x40d048]
jne 0x4026f5
pop edi
pop esi
push ebx
call fcn.00402da6
add esp, 4
pop ebp
pop ebx
ret

Function at 0x402760
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
sub esp, 0xc
push ebx
lea eax, [esp + 8]
push eax
push 1
xor ebx, ebx
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerUser_Shell_Folders
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40285e
mov eax, dword [esp + 8]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea ecx, [esp + 8]
push ecx
push ebx
lea edx, [esp + 0x18]
push edx
push ebx
push str.Common_Programs
push eax
mov dword [esp + 0x20], ebx
call edi
test eax, eax
jne 0x402852
mov eax, dword [esp + 8]
cmp eax, ebx
jbe 0x402852
push esi
push eax
call fcn.0040340c
mov esi, eax
add esp, 4
cmp esi, ebx
jne 0x4027e9
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [esp + 0x10]
pop esi
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, ebx
pop ebx
add esp, 0xc
ret
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0xc]
push ecx
push esi
lea edx, [esp + 0x1c]
push edx
push ebx
push str.Common_Programs
push eax
call edi
test eax, eax
jne 0x402848
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push ebx
push ebx
push esi
call ebp
mov edi, eax
test edi, edi
jbe 0x402847
lea ecx, [edi + edi]
push ecx
call fcn.0040340c
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x402833
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x402847
push edi
push ebx
push esi
call ebp
test eax, eax
jne 0x402847
push ebx
call fcn.00402da6
add esp, 4
xor ebx, ebx
pop ebp
push esi
call fcn.00402da6
add esp, 4
pop esi
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, ebx
pop ebx
add esp, 0xc
ret
Function at 0x403459
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x40ad40
call fcn.0040662c
mov edi, 0x94
mov eax, edi
call fcn.00402e30
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 [0x40d75c], ecx
mov eax, dword [esi + 4]
mov dword [0x40d768], eax
mov edx, dword [esi + 8]
mov dword [0x40d76c], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x40d760], esi
cmp ecx, 2
je 0x4034b9
or esi, 0x8000
mov dword [0x40d760], esi
shl eax, 8
add eax, edx
mov dword [0x40d764], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x4034f4
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4034f4
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40350c
cmp eax, 0x20b
je 0x4034f9
mov dword [ebp - 0x1c], esi
jmp 0x403520
cmp dword [ecx + 0x84], 0xe
jbe 0x4034f4
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x40351a
cmp dword [ecx + 0x74], 0xe
jbe 0x4034f4
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.0040364f
pop ecx
test eax, eax
jne 0x40354c
cmp dword [0x40d730], 1
jne 0x403539
call fcn.00405dfa
push 0x1c
call fcn.00405c82
push 0xff
call fcn.00405ae7
pop ecx
pop ecx
call fcn.004065a3
mov dword [ebp - 4], esi
call fcn.004063f8
test eax, eax
jge 0x403565
push 0x1b
call fcn.00403434
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40ed18], eax
call fcn.004062d6
mov dword [0x40d728], eax
call fcn.00406234
test eax, eax
jge 0x40358b
push 8
call fcn.00403434
pop ecx
call fcn.00406001
test eax, eax
jge 0x40359c
push 9
call fcn.00403434
pop ecx
push 1
call fcn.00405b17
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x4035b2
push eax
call fcn.00403434
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00405fa4
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x4035d3
movzx eax, word [ebp - 0x40]
jmp 0x4035d6
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00401680
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x4035f4
push edi
call fcn.00405c42
call fcn.00405c64
jmp 0x403626
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00406667
ret
Function at 0x405b81
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x40d79c], esi
push edi
jne 0x405ba1
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 [0x40d798], esi
mov byte [0x40d794], al
jne 0x405c07
mov ecx, dword [0x40ece8]
test ecx, ecx
je 0x405be8
mov eax, dword [0x40ece4]
sub eax, 4
cmp eax, ecx
jmp 0x405be1
mov eax, dword [eax]
test eax, eax
je 0x405bd3
call eax
mov eax, dword [0x40ece4]
sub eax, 4
cmp eax, dword [0x40ece8]
mov dword [0x40ece4], eax
jae 0x405bcb
mov eax, 0x40d024
mov esi, 0x40d02c
cmp eax, esi
mov edi, eax
jae 0x405c07
mov eax, dword [edi]
test eax, eax
je 0x405c00
call eax
add edi, 4
cmp edi, esi
jb 0x405bf8
mov eax, 0x40d030
mov esi, 0x40d038
cmp eax, esi
mov edi, eax
jae 0x405c26
mov eax, dword [edi]
test eax, eax
je 0x405c1f
call eax
add edi, 4
cmp edi, esi
jb 0x405c17
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x405c40
push dword [ebp + 8]
mov dword [0x40d79c], 1
call fcn.00405ae7
pop ebp
ret

Function at 0x405c82
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [0x40d0b4]
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 + 0x40d0c0]
je 0x405cb9
inc eax
cmp eax, 0x13
jb 0x405caa
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x40d0c0]
jne 0x405ddc
mov eax, dword [0x40d730]
cmp eax, 1
je 0x405db7
cmp eax, edx
jne 0x405ce9
cmp dword [0x40d0a4], 1
je 0x405db7
cmp ecx, 0xfc
je 0x405ddc
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 0x405d1f
lea eax, [ebp - 0x7c]
push str._program_name_unknown_
push eax
call fcn.00407270
pop ecx
pop ecx
lea edi, [ebp - 0x7c]
mov eax, edi
push eax
call fcn.00405130
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x405d53
mov eax, edi
push eax
call fcn.00405130
mov edi, eax
lea eax, [ebp - 0x7c]
sub eax, 0x3b
push 3
add edi, eax
push 0x40b1d8
push edi
call fcn.00407370
add esp, 0x10
push edi
call fcn.00405130
push dword [esi + 0x40d0c4]
mov ebx, eax
call fcn.00405130
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00402e30
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00407270
push edi
push ebx
call fcn.00407280
push 0x40b1b8
push ebx
call fcn.00407280
push dword [esi + 0x40d0c4]
push ebx
call fcn.00407280
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040716c
add esp, 0x2c
jmp 0x405ddc
push edx
lea eax, [ebp - 0x80]
push eax
lea esi, [esi + 0x40d0c4]
push dword [esi]
call fcn.00405130
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.00406efc
add ebp, 0x90
leave
ret
Function at 0x406d20
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.00402e30
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x406dbb
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 [0x40d75c]
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 0x406dbb
cmp eax, 1
je 0x406ddc
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 0x406dbb
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x406d88
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x406db7
xor eax, eax
inc eax
jmp 0x406dfb
cmp edi, eax
jae 0x406dbf
xor eax, eax
jmp 0x406dfb
cmp eax, esi
jae 0x406dc6
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 [0x40d75c]
jmp 0x406ddf
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 0x40716c
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x40d8b8], ebx
push esi
push edi
jne 0x4071ec
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x407227
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x40d8b8], eax
je 0x407227
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x40d8bc], eax
call esi
cmp dword [0x40d75c], 2
mov dword [0x40d8c0], eax
jne 0x4071ec
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x40d8c8], eax
je 0x4071ec
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x40d8c4], eax
mov eax, dword [0x40d8c4]
test eax, eax
je 0x407231
call eax
test eax, eax
je 0x407218
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x40d8c8]
test eax, eax
je 0x407218
test byte [ebp - 8], 1
jne 0x407231
cmp dword [0x40d768], 4
jb 0x40722b
or byte [ebp + 0x12], 0x20
jmp 0x407250
xor eax, eax
jmp 0x407260
or byte [ebp + 0x12], 4
jmp 0x407250
mov eax, dword [0x40d8bc]
test eax, eax
je 0x407250
call eax
mov ebx, eax
test ebx, ebx
je 0x407250
mov eax, dword [0x40d8c0]
test eax, eax
je 0x407250
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x40d8b8]
pop edi
pop esi
pop ebx
leave
ret