joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1001394
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [eax + 0x3c]
sub esp, 0xc
push ebx
push esi
push edi
lea edi, [ecx + eax + 0x78]
mov ecx, dword [edi]
test ecx, ecx
je 0x1001428
mov esi, dword [edi + 4]
cmp esi, 0x28
jb 0x1001428
lea ebx, [ecx + eax]
mov edx, dword [ebx + 0x18]
test edx, edx
je 0x1001428
mov eax, dword [ebx + 0x20]
cmp eax, ecx
jb 0x1001428
lea edx, [eax + edx*4]
add esi, ecx
cmp esi, edx
jb 0x1001428
and dword [ebp - 4], 0
sub eax, ecx
add eax, ebx
cmp dword [ebx + 0x18], 0
mov dword [ebp - 0xc], eax
jbe 0x1001428
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
lea eax, [eax + ecx*4]
mov ecx, dword [edi]
cmp ecx, dword [eax]
ja 0x100141d
mov esi, dword [eax]
push dword [ebp + 8]
mov eax, ecx
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [edi + 4]
add ecx, dword [ebp - 8]
lea eax, [eax + esi + 1]
cmp eax, ecx
ja 0x100141d
sub esi, dword [ebp - 8]
push dword [ebp + 8]
add esi, ebx
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x100142f
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
cmp eax, dword [ebx + 0x18]
jb 0x10013dd
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov edx, dword [ebp - 4]
cmp dword [ebx + 0x14], edx
jbe 0x1001428
mov eax, dword [ebx + 0x1c]
mov ecx, dword [edi]
cmp eax, ecx
jb 0x1001428
lea eax, [eax + edx*4]
mov edx, dword [edi + 4]
add edx, ecx
lea esi, [eax + 4]
cmp edx, esi
jb 0x1001428
sub eax, ecx
mov eax, dword [eax + ebx]
jmp 0x100142a

Function at 0x10014c1
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebx
push esi
push edi
xor edi, edi
push edi
push dword [esp + 0x14]
push edi
push 0x8000040
push edi
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov esi, eax
cmp esi, edi
je 0x10014fc
push edi
push edi
push edi
push 0xf001f
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, edi
jne 0x1001510
push 0x40
push 0x101000
push dword [esp + 0x18]
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, eax
pop edi
pop esi
mov eax, ebx
pop ebx
ret
Function at 0x1001a43
Capabilities:
Read file on windows
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
xor ebx, ebx
cmp dword [eax + 0x38], ebx
jne 0x1001a60
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1001bdf
mov ecx, dword [eax + 0x34]
push edi
push ebx
mov dword [ebp - 8], ecx
lea ecx, [ebp - 8]
push ecx
push dword [eax + 0x30]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea eax, [ebp - 0xc]
push eax
push 0xc
lea eax, [ebp - 0x1c]
push eax
push dword [ebp + 8]
call edi
push dword [ebp - 0x18]
call fcn.010014c1
pop ecx
mov dword [ebp - 4], eax
cmp eax, ebx
jne 0x1001aad
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1001bde
push esi
push ebx
lea ecx, [ebp - 0xc]
push ecx
push dword [ebp - 0x18]
push eax
push dword [ebp + 8]
call edi
mov eax, dword [ebp - 0x1c]
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
push ebx
push eax
push ebx
push 0x40
push ebx
push 0xffffffffffffffff
mov dword [ebp - 0x10], eax
call edi
mov esi, eax
cmp esi, ebx
jne 0x1001aea
push ebx
push dword [ebp - 0x10]
push ebx
push 4
push ebx
push 0xffffffffffffffff
call edi
mov esi, eax
cmp esi, ebx
je 0x1001b15
push ebx
push ebx
push ebx
push 0x26
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
cmp edi, ebx
jne 0x1001b20
push ebx
push ebx
push ebx
push 6
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
cmp edi, ebx
jne 0x1001b20
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 4]
call fcn.01001516
pop ecx
jmp 0x1001b89
cmp dword [ebp - 0x14], ebx
jne 0x1001b34
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 4]
mov eax, edi
call fcn.01001528
jmp 0x1001b43
push dword [ebp - 0x1c]
push edi
push dword [ebp - 4]
call fcn.010020f0
add esp, 0xc
push dword [ebp - 4]
call fcn.01001516
mov eax, dword [edi + 0x3c]
pop ecx
cmp edi, dword [eax + edi + 0x34]
je 0x1001b93
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push edi
push ebx
push ebx
push ebx
push 0x26
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFileEx]
mov edi, eax
cmp edi, ebx
jne 0x1001b93
push ebx
push ebx
push ebx
push ebx
push 0x26
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFileEx]
mov edi, eax
cmp edi, ebx
jne 0x1001b93
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1001bd7
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp + 0xc], bl
je 0x1001bae
push dword [ebp - 0x1c]
push edi
call fcn.010016b3
pop ecx
pop ecx
test al, al
je 0x1001bd0
mov eax, dword [edi + 0x3c]
lea esi, [eax + edi + 0x18]
mov eax, edi
sub eax, dword [esi + 0x1c]
push eax
call fcn.0100153c
push dword [esi + 0x68]
push esi
call fcn.010015ca
add esp, 0xc
test al, al
jne 0x1001bdb
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
xor eax, eax
jmp 0x1001bdd
mov eax, edi
pop esi
pop edi
pop ebx
leave
ret
Function at 0x10020f0
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 4]
push ebx
mov bl, byte [eax]
push esi
cmp bl, 0xd8
je 0x1002121
cmp bl, 0xd7
je 0x1002121
mov esi, dword [esp + 0x14]
lea ecx, [eax + 1]
test esi, esi
jle 0x1002149
mov eax, dword [esp + 0x10]
sub ecx, eax
mov dl, byte [ecx + eax]
mov byte [eax], dl
inc eax
sub esi, 1
jne 0x1002113
pop esi
pop ebx
ret
mov esi, dword [esp + 0x10]
push esi
inc eax
push eax
call fcn.0100216e
cmp bl, 0xd8
jne 0x1002149
mov ecx, dword [esp + 0x14]
xor eax, eax
test ecx, ecx
jle 0x1002149
lea esp, [esp]
xor byte [eax + esi], 0xf0
inc eax
cmp eax, ecx
jl 0x1002140
pop esi
pop ebx
ret
Function at 0x401ee2
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x411280]
jne 0x401eec
repz ret
jmp fcn.00404369

Function at 0x4025e7
Capabilities:
Accept command line arguments
Parse pe header

Disassembly:
push 0x14
push 0x40f530
call fcn.00403770
mov eax, 0x5a4d
cmp word [0x400000], ax
jne 0x4024e7
mov eax, dword [0x40003c]
cmp dword [eax + 0x400000], 0x4550
jne 0x4024e7
mov ecx, 0x10b
cmp word [eax + 0x400018], cx
jne 0x4024e7
cmp dword [eax + 0x400074], 0xe
jbe 0x4024e7
xor ecx, ecx
cmp dword [eax + 0x4000e8], ecx
setne cl
mov dword [ebp - 0x1c], ecx
jmp 0x4024eb
and dword [ebp - 0x1c], 0
push 1
call fcn.00407949
pop ecx
test eax, eax
jne 0x4024ff
push 0x1c
call fcn.00407949
pop ecx
call fcn.00405287
test eax, eax
jne 0x402510
push 0x10
call fcn.00407949
pop ecx
call fcn.00405952
and dword [ebp - 4], 0
call fcn.004032ff
test eax, eax
jge 0x40252a
push 0x1b
call fcn.00407949
pop ecx
call dword [sym.imp.kernel32.dll_GetCommandLineA]
mov dword [0x412ba0], eax
call fcn.00407949
mov dword [0x41203c], eax
call fcn.00407949
test eax, eax
jge 0x402550
push 8
call fcn.00407949
pop ecx
call fcn.00405fde
test eax, eax
jge 0x402561
push 9
call fcn.00407949
pop ecx
push 1
call fcn.00407949
pop ecx
test eax, eax
je 0x402574
push eax
call fcn.00407949
pop ecx
mov eax, dword [0x412018]
mov dword [0x41201c], eax
push eax
push dword [0x412010]
push dword [0x41200c]
call main
add esp, 0xc
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x1c], 0
jne 0x4025a2
push eax
call fcn.00407949
call fcn.00402400
jmp 0x4025d7
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [ebp - 0x20]
call fcn.004037b5
ret
call fcn.00407949
jmp 0x402495

Function at 0x407949
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
pushal
call 0x407958
pop dword [ebp - 0x40]
mov eax, 0x222baa19
add eax, 0xde14cf3f
sub dword [ebp - 0x40], eax
push 0x40
push 0x1000
push 0x372fa
push 0
mov eax, 0x801b8ddd
add eax, 0x802552fb
add eax, dword [ebp - 0x40]
call dword [eax]
mov ecx, 0xee03a986
sub ecx, 0xee036afd
xor edi, edi
add edi, eax
mov edx, 0x413bc4
add edx, dword [ebp - 0x40]
mov esi, 0xeb60ee77
add esi, 0x3ae5c0ad
sub dword [ebp - 0x24], esi
mov ebx, dword [edx]
xor ebx, esi
mov dword [edi], ebx
add dword [ebp - 4], esi
add edi, 0x5d93a163
add edi, 0xa26c5ea1
add edx, 4
loop 0x4079b3
add eax, 0xecf7
mov ebx, eax
add eax, 0xfd1006f
add eax, 0xf02eff96
mov ecx, 0x7d8d1c59
sub ecx, 0x7d4d1c59
add ecx, dword [ebp - 0x40]
call ebx
leave
ret
Function at 0x4010a0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x10
mov eax, 4
push esi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], eax
lea eax, [esp + 4]
push eax
push 0x20019
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenCurrentUser]
mov edx, dword [esp + 0x18]
lea ecx, [esp + 8]
push ecx
push 0x20019
push 0
mov esi, eax
mov eax, dword [esp + 0x10]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x401109
test esi, esi
jne 0x401102
mov ecx, dword [esp + 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop esi
add esp, 0x10
ret
mov eax, dword [esp + 0x20]
push ebx
push edi
lea edx, [esp + 0x14]
push edx
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x20]
push ecx
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ecx, dword [esp + 0x10]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
mov edi, eax
call ebx
test esi, esi
jne 0x401146
mov edx, dword [esp + 0xc]
push edx
call ebx
xor eax, eax
test edi, edi
pop edi
pop ebx
sete al
pop esi
add esp, 0x10
ret

Function at 0x401160
Capabilities:
Set registry value

Disassembly:
sub esp, 8
push esi
lea eax, [esp + 4]
push eax
push 0x20006
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenCurrentUser]
mov edx, dword [esp + 0x10]
push 0
lea ecx, [esp + 0xc]
push ecx
push 0
push 0x20006
push 0
push 0
push 0
mov esi, eax
mov eax, dword [esp + 0x20]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x4011c4
test esi, esi
jne 0x4011bd
mov ecx, dword [esp + 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop esi
add esp, 8
ret
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 8]
push ebx
push edi
push 4
lea edx, [esp + 0x24]
push edx
push 4
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edx, dword [esp + 0x10]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edx
mov edi, eax
call ebx
test esi, esi
jne 0x4011fb
mov eax, dword [esp + 0xc]
push eax
call ebx
xor eax, eax
test edi, edi
pop edi
pop ebx
sete al
pop esi
add esp, 8
ret
Function at 0x401220
Capabilities:
Access peb ldr_data
Get number of processors
Print debug messages

Disassembly:
push 0xffffffffffffffff
push 0x405338
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push esi
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push edi
push str.Toolbar_ShowDeskBand_entry
call esi
xor edi, edi
mov dword [esp + 0xc], 1
mov dword [esp + 8], edi
lea eax, [esp + 8]
push eax
push 0x40619c
push 0x17
push edi
push 0x4066e8
mov dword [esp + 0x30], edi
call dword [sym.imp.ole32.dll_CoCreateInstance]
cmp eax, edi
jl 0x401377
cmp dword [esp + 0x24], edi
je 0x40135f
push str.Toolbar_CoCreateInstance_succeeded_ShowDeskBand_called
call esi
mov eax, dword [esp + 8]
mov ecx, dword [eax]
push 0x408040
push eax
call dword [ecx + 0xc]
cmp eax, edi
jl 0x401358
push ebx
push ebp
push str.Toolbar_ShowDeskBand_succeded
call esi
mov ebx, dword [sym.imp.USER32.dll_FindWindowW]
push str.Access_Connections
push str.32770
call ebx
test eax, eax
mov ebp, dword [sym.imp.USER32.dll_PostMessageW]
jne 0x4012d6
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 0x32
jl 0x4012b0
jmp 0x4012e9
push 0
push 0xd
push 0x100
push eax
call ebp
push str.Toolbar_Found_Window_Access_Connections_short_delay
call esi
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x1f4
call edi
push 1
push str.bGaugeShown
push str.SoftwareLenovoAccess_ConnectionsOptions
call fcn.00401160
add esp, 0xc
test eax, eax
je 0x401315
push str.Toolbar_SetUserRegDWord_SET
jmp 0x40131a
push str.Toolbar_SetUserRegDWord_FAILED
call esi
mov dword [esp + 0x18], 0x3c
push str.Access_Connections
push str.32770
call ebx
test eax, eax
je 0x401347
push 0
push 0xd
push 0x100
push eax
call ebp
push str.Toolbar_Found_Window_Access_Connections
call esi
push 0x3e8
call edi
dec dword [esp + 0x18]
jne 0x401324
pop ebp
pop ebx
jmp 0x401382
push str.Toolbar_ShowDeskBand_fail
jmp 0x40137c
push str.Toolbar_CoCreateInstance_succeeded_HideDeskBand_called
call esi
mov eax, dword [esp + 8]
mov edx, dword [eax]
push 0x408040
push eax
call dword [edx + 0x10]
jmp 0x401382
push str.Toolbar_CLSID_TrayDeskBand_fail
call esi
mov dword [esp + 0xc], edi
push str.Toolbar_ShowDeskBand_exit
call esi
mov eax, dword [esp + 8]
test eax, eax
pop edi
mov dword [esp + 0x18], 0xffffffff
pop esi
je 0x4013a1
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 4]
mov dword fs:[0], ecx
add esp, 0x18
ret
Function at 0x4013c0
Capabilities:
Print debug messages

Disassembly:
push ecx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push str.Toolbar_winmain_entry
call esi
lea eax, [esp + 4]
push eax
push str.bGaugeShown
push str.SoftwareLenovoAccess_ConnectionsOptions
mov dword [esp + 0x10], 0
call fcn.004010a0
mov eax, dword [esp + 0x10]
add esp, 0xc
test eax, eax
je 0x401407
push str.Toolbar_winmain_exit._Gauge_Already_shown_for_this_user._so_QUIT
call esi
mov eax, 1
pop esi
pop ecx
ret 0x10
push 0
push 0
call dword [sym.imp.ole32.dll_CoInitializeEx]
push 1
call fcn.00401220
add esp, 4
test eax, eax
jne 0x401443
push edi
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push str.Toolbar_3_secs_fail_wait_time
call esi
push 0xbb8
call edi
push 1
call fcn.00401220
add esp, 4
test eax, eax
je 0x401426
pop edi
push str.Toolbar_succeded_break_while_loop
call esi
call dword [sym.imp.ole32.dll_CoUninitialize]
push str.Toolbar_winmain_exit
call esi
pop esi
pop ecx
ret 0x10
Function at 0x401c57
Capabilities:
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x406728
call fcn.004021e0
mov edi, 0x94
mov eax, edi
call fcn.004048d0
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 [0x408284], ecx
mov eax, dword [esi + 4]
mov dword [0x408290], eax
mov edx, dword [esi + 8]
mov dword [0x408294], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x408288], esi
cmp ecx, 2
je 0x401cb7
or esi, 0x8000
mov dword [0x408288], esi
shl eax, 8
add eax, edx
mov dword [0x40828c], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x401cf2
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x401cf2
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x401d0a
cmp eax, 0x20b
je 0x401cf7
mov dword [ebp - 0x1c], esi
jmp 0x401d1e
cmp dword [ecx + 0x84], 0xe
jbe 0x401cf2
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x401d18
cmp dword [ecx + 0x74], 0xe
jbe 0x401cf2
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.0040277f
pop ecx
test eax, eax
jne 0x401d4a
cmp dword [0x40820c], 1
jne 0x401d37
call fcn.00403fda
push 0x1c
call fcn.00403e63
push 0xff
call fcn.00403c0c
pop ecx
pop ecx
call fcn.00404847
mov dword [ebp - 4], esi
call fcn.0040469c
test eax, eax
jge 0x401d63
push 0x1b
call fcn.00401c32
pop ecx
call fcn.004045fd
mov dword [0x408654], eax
call fcn.00404493
mov dword [0x408208], eax
call fcn.004043fd
test eax, eax
jge 0x401d88
push 8
call fcn.00401c32
pop ecx
call fcn.004041ca
test eax, eax
jge 0x401d99
push 9
call fcn.00401c32
pop ecx
push 1
call fcn.00403c3c
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x401daf
push eax
call fcn.00401c32
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
call fcn.00404184
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x401dd0
movzx eax, word [ebp - 0x40]
jmp 0x401dd3
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.004013c0
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x401df1
push edi
call fcn.00403d67
call fcn.00403d89
jmp 0x401e23
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040221b
ret
Function at 0x40253c
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 0x40256a
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 0x402571
cmp ebx, dword [eax + 4]
jae 0x402571
xor eax, eax
jmp 0x402761
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x402582
xor eax, eax
inc eax
jmp 0x402760
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x402598
cmp ecx, edx
jae 0x4026dd
cmp dword [eax + 4], 0
je 0x4025a1
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x402589
cmp dword [ebp + 8], 0
je 0x4025c3
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x4026dd
cmp eax, esi
jae 0x4026dd
mov eax, dword [0x408218]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x4025e8
cmp dword [esi*4 + 0x408220], edi
je 0x4026e1
inc esi
cmp esi, eax
jl 0x4025d6
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40275d
cmp dword [ebp - 8], 0x1000000
jne 0x40275d
test byte [ebp - 0xc], 0xcc
je 0x402666
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x40275d
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x40275d
cmp word [eax + 0x18], 0x10b
jne 0x40275d
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x40275d
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x402666
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x402666
test byte [ecx + 0x27], 0x80
jne 0x4026dd
push 1
push 0x408260
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x40257a
mov ecx, dword [0x408218]
test ecx, ecx
mov edx, ecx
jle 0x40269a
lea eax, [ecx*4 + 0x40821c]
cmp dword [eax], edi
je 0x40269a
dec edx
sub eax, 4
test edx, edx
jg 0x40268e
test edx, edx
jne 0x4026cb
push 0xf
pop ebx
cmp ecx, ebx
jg 0x4026a7
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x4026bf
lea eax, [edx*4 + 0x408220]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x4026ad
cmp ecx, 0x10
jge 0x4026cb
inc ecx
mov dword [0x408218], ecx
push 0
push 0x408260
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x40257a
xor eax, eax
jmp 0x402760
test esi, esi
jle 0x40257a
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x408260
call ebx
test eax, eax
jne 0x40257a
cmp dword [esi*4 + 0x408220], edi
je 0x402737
mov eax, dword [0x408218]
lea esi, [eax - 1]
test esi, esi
jl 0x402725
cmp dword [esi*4 + 0x408220], edi
je 0x402721
dec esi
jns 0x402715
test esi, esi
jge 0x402735
cmp eax, 0x10
jge 0x402730
inc eax
mov dword [0x408218], eax
lea esi, [eax - 1]
jmp 0x402737
je 0x40274f
xor ecx, ecx
test esi, esi
jl 0x40274f
lea eax, [ecx*4 + 0x408220]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x40273d
push 0
push 0x408260
call ebx
jmp 0x40257a
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x403ca6
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x4082c4], esi
push edi
jne 0x403cc6
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 [0x4082c0], esi
mov byte [0x4082bc], al
jne 0x403d2c
mov ecx, dword [0x408628]
test ecx, ecx
je 0x403d0d
mov eax, dword [0x408624]
sub eax, 4
cmp eax, ecx
jmp 0x403d06
mov eax, dword [eax]
test eax, eax
je 0x403cf8
call eax
mov eax, dword [0x408624]
sub eax, 4
cmp eax, dword [0x408628]
mov dword [0x408624], eax
jae 0x403cf0
mov eax, 0x408020
mov esi, 0x408024
cmp eax, esi
mov edi, eax
jae 0x403d2c
mov eax, dword [edi]
test eax, eax
je 0x403d25
call eax
add edi, 4
cmp edi, esi
jb 0x403d1d
mov eax, 0x408028
mov esi, 0x408030
cmp eax, esi
mov edi, eax
jae 0x403d4b
mov eax, dword [edi]
test eax, eax
je 0x403d44
call eax
add edi, 4
cmp edi, esi
jb 0x403d3c
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x403d65
push dword [ebp + 8]
mov dword [0x4082c4], 1
call fcn.00403c0c
pop ebp
ret

Function at 0x403e63
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x408050]
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 + 0x408080]
je 0x403e98
inc eax
cmp eax, 0x13
jb 0x403e89
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x408080]
jne 0x403fbe
mov eax, dword [0x40820c]
cmp eax, 1
je 0x403f96
cmp eax, edx
jne 0x403ec8
cmp dword [0x408068], 1
je 0x403f96
cmp ecx, 0xfc
je 0x403fbe
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 0x403efe
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00404d70
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00404fa0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x403f32
mov eax, edi
push eax
call fcn.00404fa0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x40676c
push edi
call fcn.00404e70
add esp, 0x10
push edi
call fcn.00404fa0
push dword [esi + 0x408084]
mov ebx, eax
call fcn.00404fa0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.004048d0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00404d70
push edi
push ebx
call fcn.00404d80
push 0x406768
push ebx
call fcn.00404d80
push dword [esi + 0x408084]
push ebx
call fcn.00404d80
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00404c6d
add esp, 0x2c
jmp 0x403fbe
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x408084]
push dword [esi]
call fcn.00404fa0
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.00401585
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret