joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402480
Capabilities:
Check os version
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xcc
mov eax, dword [0x42a874]
xor ecx, ecx
mov dword [esp], ecx
mov dword [esp + 4], ecx
mov dword [esp + 8], ecx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ecx
push ebx
push esi
mov esi, dword [ebp + 8]
mov dword [esp + 0x20], ecx
mov dword [esp + 0xd0], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x24], ecx
push edi
mov dword [esi], 0xa
mov dword [esp + 0x2c], ecx
mov dword [eax], 5
xor eax, eax
mov ecx, 0x27
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
lea edx, [esp + 0x30]
push edx
mov dword [esp + 0x34], 0x9c
call edi
test eax, eax
setne bl
test bl, bl
jne 0x402525
lea eax, [esp + 0x30]
push eax
mov dword [esp + 0x34], 0x94
call edi
test eax, eax
jne 0x402525
xor al, al
mov ecx, dword [esp + 0xd4]
call fcn.004064ce
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [esp + 0x40]
sub eax, 0
je 0x4026c9
dec eax
je 0x402631
dec eax
jne 0x4026cf
mov ecx, dword [esp + 0x34]
cmp ecx, 6
mov edi, dword [esp + 0xc]
mov dl, byte [esp + 0xca]
jne 0x402573
mov eax, dword [esp + 0x38]
test eax, eax
jne 0x4025c5
xor eax, eax
cmp dl, 1
setne al
mov dword [esi], eax
jmp 0x4025c5
cmp ecx, 5
jne 0x4025ba
mov eax, dword [esp + 0x38]
cmp eax, 2
jne 0x4025a1
cmp dl, 1
jne 0x402599
cmp di, 9
jne 0x402599
mov eax, dword [ebp + 0xc]
mov dword [esi], ecx
mov dword [eax], 2
jmp 0x4025c5
mov dword [esi], 2
jmp 0x4025c5
cmp eax, 1
jne 0x4025ae
mov dword [esi], 5
jmp 0x4025c5
test eax, eax
jne 0x4025c5
mov dword [esi], 3
jmp 0x4025c5
cmp ecx, 4
ja 0x4025c5
mov dword [esi], 4
test bl, bl
je 0x4026cf
cmp dl, 1
jne 0x4026cf
cmp di, 9
je 0x4026cf
cmp ecx, 4
jne 0x402603
mov ecx, dword [ebp + 0xc]
mov dword [ecx], 0
mov al, dl
mov ecx, dword [esp + 0xd4]
call fcn.004064ce
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0xc8]
mov eax, dword [ebp + 0xc]
and edx, 0x200
neg edx
sbb edx, edx
add edx, 2
mov dword [eax], edx
mov al, 1
mov ecx, dword [esp + 0xd4]
call fcn.004064ce
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esp + 0x34], 4
jne 0x4026cf
mov eax, dword [esp + 0x38]
test eax, eax
jne 0x402674
mov al, byte [esp + 0x45]
cmp al, 0x43
mov dword [esi], 7
je 0x402656
cmp al, 0x42
jne 0x4026cf
mov ecx, dword [ebp + 0xc]
mov dword [ecx], 4
mov al, 1
mov ecx, dword [esp + 0xd4]
call fcn.004064ce
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 0xa
jne 0x4026a9
mov al, byte [esp + 0x45]
cmp al, 0x41
mov dword [esi], 6
je 0x40268b
cmp al, 0x42
jne 0x4026cf
mov edx, dword [ebp + 0xc]
mov dword [edx], 3
mov al, 1
mov ecx, dword [esp + 0xd4]
call fcn.004064ce
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 0x5a
jne 0x4026cf
mov dword [esi], 8
mov al, 1
mov ecx, dword [esp + 0xd4]
call fcn.004064ce
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi], 9
mov ecx, dword [esp + 0xd4]
mov al, 1
call fcn.004064ce
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x402ae0
Capabilities:
Create service
Persist via windows service

Disassembly:
push 0xffffffffffffffff
push 0x420663
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x168
mov eax, dword [0x42a874]
push ebx
push ebp
push esi
mov dword [esp + 0x170], eax
push edi
mov esi, ecx
mov al, byte [esi + 0x3c]
xor ebx, ebx
cmp al, bl
mov dword [esp + 0x180], ebx
jne 0x402b42
cmp dword [esp + 0x1a0], 0x10
jb 0x402bf5
mov eax, dword [esp + 0x18c]
push eax
call fcn.0041a56d
add esp, 4
xor al, al
jmp 0x402cbd
cmp dword [esp + 0x19c], ebx
jne 0x402b58
cmp dword [esp + 0x1a0], 0x10
jmp 0x402be3
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x2c], esp
push 0x1a
mov edi, 0xf
mov dword [ecx + 0x18], edi
mov dword [ecx + 0x14], ebx
push str.Protexis_Licensing_Service
mov byte [ecx + 4], bl
call fcn.004014c0
lea ecx, [esp + 0x30]
call fcn.00412650
mov eax, dword [esp + 0x1a0]
mov ebp, 0x10
cmp eax, ebp
mov eax, dword [esp + 0x18c]
mov byte [esp + 0x180], 1
jae 0x402baa
lea eax, [esp + 0x18c]
lea edx, [esp + 0x34]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
jne 0x402bfc
cmp dword [esp + 0x2c], ebp
jb 0x402bce
mov eax, dword [esp + 0x18]
push eax
call fcn.0041a56d
add esp, 4
mov eax, dword [esp + 0x1a0]
mov dword [esp + 0x2c], edi
mov dword [esp + 0x28], ebx
mov byte [esp + 0x18], bl
cmp eax, ebp
jb 0x402bf5
mov ecx, dword [esp + 0x18c]
push ecx
call fcn.0041a56d
add esp, 4
xor al, al
jmp 0x402cbd
push 2
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
cmp edi, ebx
jne 0x402c37
push ebx
push 0xc0000019
lea ecx, [esp + 0x1c]
call fcn.00412bf0
lea ecx, [esp + 0x14]
call fcn.004013a0
lea ecx, [esp + 0x188]
call fcn.004013a0
xor al, al
jmp 0x402cbd
cmp dword [esp + 0x1a0], ebp
mov edx, dword [esp + 0x18c]
jae 0x402c4e
lea edx, [esp + 0x18c]
cmp dword [esi + 0x34], ebp
jb 0x402c58
mov ecx, dword [esi + 0x20]
jmp 0x402c5b
lea ecx, [esi + 0x20]
cmp dword [esi + 0x18], ebp
jb 0x402c65
mov eax, dword [esi + 4]
jmp 0x402c68
lea eax, [esi + 4]
push ebx
push ebx
push ebx
push ebx
push ebx
push edx
push 1
push 2
push ebp
push 0xf01ff
push ecx
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov esi, eax
cmp esi, ebx
je 0x402c8b
mov bl, 1
jmp 0x402c9a
push ebx
push 0xc0000023
lea ecx, [esp + 0x1c]
call fcn.00412bf0
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
lea ecx, [esp + 0x14]
call fcn.004013a0
lea ecx, [esp + 0x188]
call fcn.004013a0
mov al, bl
mov ecx, dword [esp + 0x178]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x174]
call fcn.004064ce
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x174
ret 0x1c
Function at 0x402cf0
Capabilities:
Start service

Disassembly:
push 0xffffffffffffffff
push 0x420678
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x28
mov eax, dword [0x42a874]
push ebx
push esi
mov esi, ecx
mov dword [esp + 0x2c], eax
mov al, byte [esi + 0x3c]
test al, al
push edi
je 0x402de6
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x28], esp
push 0x1a
mov dword [ecx + 0x18], 0xf
mov dword [ecx + 0x14], 0
push str.Protexis_Licensing_Service
mov byte [ecx + 4], 0
call fcn.004014c0
lea ecx, [esp + 0x2c]
call fcn.00412650
push 1
push 0
push 0
mov dword [esp + 0x48], 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
jne 0x402d95
push eax
push 0xc0000019
lea ecx, [esp + 0x18]
call fcn.00412bf0
cmp dword [esp + 0x28], 0x10
jb 0x402de6
mov eax, dword [esp + 0x14]
push eax
call fcn.0041a56d
add esp, 4
xor al, al
jmp 0x402e2c
mov eax, dword [esi + 0x18]
mov ebx, 0x10
cmp eax, ebx
jb 0x402da6
mov esi, dword [esi + 4]
jmp 0x402da9
add esi, 4
push 0x20000000
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
push 0
jne 0x402dea
push 0xc0000020
lea ecx, [esp + 0x18]
call fcn.00412bf0
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [esp + 0x28], ebx
jb 0x402de6
mov ecx, dword [esp + 0x14]
push ecx
call fcn.0041a56d
add esp, 4
xor al, al
jmp 0x402e2c
push 0
push esi
mov bl, 1
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x402e0a
push eax
push 0xc0000024
lea ecx, [esp + 0x18]
call fcn.00412bf0
xor bl, bl
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
cmp dword [esp + 0x28], 0x10
jb 0x402e2a
mov edx, dword [esp + 0x14]
push edx
call fcn.0041a56d
add esp, 4
mov al, bl
mov ecx, dword [esp + 0x34]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x30]
call fcn.004064ce
pop edi
pop esi
pop ebx
add esp, 0x34
ret
Function at 0x402e50
Capabilities:
Stop service

Disassembly:
push 0xffffffffffffffff
push 0x420678
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x44
mov eax, dword [0x42a874]
push ebx
push esi
mov esi, ecx
mov dword [esp + 0x48], eax
mov al, byte [esi + 0x3c]
test al, al
push edi
je 0x402f45
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x28], esp
push 0x1a
mov dword [ecx + 0x18], 0xf
mov dword [ecx + 0x14], 0
push str.Protexis_Licensing_Service
mov byte [ecx + 4], 0
call fcn.004014c0
lea ecx, [esp + 0x48]
call fcn.00412650
push 1
push 0
push 0
mov dword [esp + 0x64], 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
jne 0x402ef5
push eax
push 0xc0000019
lea ecx, [esp + 0x34]
call fcn.00412bf0
cmp dword [esp + 0x44], 0x10
jb 0x402f45
mov eax, dword [esp + 0x30]
push eax
call fcn.0041a56d
add esp, 4
xor al, al
jmp 0x402f91
mov eax, dword [esi + 0x18]
mov ebx, 0x10
cmp eax, ebx
jb 0x402f06
mov esi, dword [esi + 4]
jmp 0x402f09
add esi, 4
push 0x20000000
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x402f49
push eax
push 0xc0000020
lea ecx, [esp + 0x34]
call fcn.00412bf0
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [esp + 0x44], ebx
jb 0x402f45
mov ecx, dword [esp + 0x30]
push ecx
call fcn.0041a56d
add esp, 4
xor al, al
jmp 0x402f91
lea edx, [esp + 0x10]
push edx
push 1
push esi
mov bl, 1
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x402f6f
push 0
push 0xc0000009
lea ecx, [esp + 0x34]
call fcn.00412bf0
xor bl, bl
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
cmp dword [esp + 0x44], 0x10
jb 0x402f8f
mov eax, dword [esp + 0x30]
push eax
call fcn.0041a56d
add esp, 4
mov al, bl
mov ecx, dword [esp + 0x50]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x4c]
call fcn.004064ce
pop edi
pop esi
pop ebx
add esp, 0x50
ret
Function at 0x402fb0
Capabilities:
Delete service

Disassembly:
push 0xffffffffffffffff
push 0x420678
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x28
mov eax, dword [0x42a874]
push ebx
push esi
mov esi, ecx
mov dword [esp + 0x2c], eax
mov al, byte [esi + 0x3c]
test al, al
push edi
je 0x4030a5
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x28], esp
push 0x1a
mov dword [ecx + 0x18], 0xf
mov dword [ecx + 0x14], 0
push str.Protexis_Licensing_Service
mov byte [ecx + 4], 0
call fcn.004014c0
lea ecx, [esp + 0x2c]
call fcn.00412650
push 1
push 0
push 0
mov dword [esp + 0x48], 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
jne 0x403055
push eax
push 0xc0000019
lea ecx, [esp + 0x18]
call fcn.00412bf0
cmp dword [esp + 0x28], 0x10
jb 0x4030a5
mov eax, dword [esp + 0x14]
push eax
call fcn.0041a56d
add esp, 4
xor al, al
jmp 0x4030ea
mov eax, dword [esi + 0x18]
mov ebx, 0x10
cmp eax, ebx
jb 0x403066
mov esi, dword [esi + 4]
jmp 0x403069
add esi, 4
push 0xf003f
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x4030a9
push eax
push 0xc0000020
lea ecx, [esp + 0x18]
call fcn.00412bf0
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [esp + 0x28], ebx
jb 0x4030a5
mov ecx, dword [esp + 0x14]
push ecx
call fcn.0041a56d
add esp, 4
xor al, al
jmp 0x4030ea
push esi
mov bl, 1
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x4030c8
push 0
push 0xc0000025
lea ecx, [esp + 0x18]
call fcn.00412bf0
xor bl, bl
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
cmp dword [esp + 0x28], 0x10
jb 0x4030e8
mov edx, dword [esp + 0x14]
push edx
call fcn.0041a56d
add esp, 4
mov al, bl
mov ecx, dword [esp + 0x34]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x30]
call fcn.004064ce
pop edi
pop esi
pop ebx
add esp, 0x34
ret
Function at 0x403e80
Capabilities:
Listen for remote procedure calls

Disassembly:
push 0xffffffffffffffff
push 0x420778
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
mov eax, dword [0x42a874]
push esi
mov dword [esp + 0x20], eax
push edi
mov dword [esp + 0x20], 0xf
mov dword [esp + 0x1c], 0
mov byte [esp + 0xc], 0
push 9
push str.PSI_SVC_2
lea ecx, [esp + 0x10]
mov dword [esp + 0x38], 0
call fcn.004014c0
mov eax, dword [esp + 0x20]
mov edi, 0x10
cmp eax, edi
mov eax, dword [esp + 0xc]
jae 0x403ee5
lea eax, [esp + 0xc]
push 0
push eax
push 0xa
push str.ncalrpc
call dword [sym.imp.RPCRT4.dll_RpcServerUseProtseqEpA]
mov esi, eax
test esi, esi
je 0x403f0c
cmp dword [esp + 0x20], edi
jb 0x403f88
mov eax, dword [esp + 0xc]
push eax
jmp 0x403f80
mov ecx, dword [0x42a0c8]
push 0
push 0
push ecx
call dword [sym.imp.RPCRT4.dll_RpcServerRegisterIf]
mov esi, eax
test esi, esi
je 0x403f30
cmp dword [esp + 0x20], edi
jb 0x403f88
mov edx, dword [esp + 0xc]
push edx
jmp 0x403f80
push 0
push 0x4d2
push 1
call dword [sym.imp.RPCRT4.dll_RpcServerListen]
push 0
push 0
push 1
push 0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
test eax, eax
mov dword [0x42b928], eax
je 0x403f75
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0
call dword [sym.imp.RPCRT4.dll_RpcMgmtStopServerListening]
mov eax, dword [0x42b928]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x20], edi
jb 0x403f88
mov ecx, dword [esp + 0xc]
push ecx
call fcn.0041a56d
add esp, 4
mov ecx, dword [esp + 0x28]
pop edi
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x20]
mov eax, esi
pop esi
call fcn.004064ce
add esp, 0x2c
ret

Function at 0x40464d
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x404662
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x404674
xor eax, eax
jmp 0x4046a6
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
add eax, esi
and ecx, 0xf
jbe 0x404698
cmp esi, eax
jae 0x404670
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x40468a
cmp esi, eax
jae 0x404670
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop ebp
ret
Function at 0x406ae9
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.00406790
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x406b84
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 [0x42d8a4]
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 0x406b84
cmp eax, 1
je 0x406ba5
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 0x406b84
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x406b51
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x406b80
xor eax, eax
inc eax
jmp 0x406bc4
cmp edi, eax
jae 0x406b88
xor eax, eax
jmp 0x406bc4
cmp eax, esi
jae 0x406b8f
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 [0x42d8a4]
jmp 0x406ba8
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 0x40794c
Capabilities:
Terminate process

Disassembly:
push 8
push 0x423610
call fcn.00406bcc
push 8
call fcn.00408178
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x42d8e4], esi
jne 0x407980
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x42d8e0], esi
mov al, byte [ebp + 0x10]
mov byte [0x42d8dc], al
cmp dword [ebp + 0xc], edi
jne 0x4079ca
cmp dword [0x42f288], edi
je 0x4079ba
mov eax, dword [0x42f284]
sub eax, 4
mov dword [0x42f284], eax
cmp eax, dword [0x42f288]
jb 0x4079ba
mov eax, dword [eax]
cmp eax, edi
je 0x40799b
call eax
jmp 0x40799b
push 0x42a084
mov eax, 0x42a07c
call fcn.004078ca
pop ecx
push 0x42a090
mov eax, 0x42a088
call fcn.004078ca
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x4079fb
cmp dword [ebp + 0x10], edi
jne 0x407a09
mov dword [0x42d8e4], esi
push dword [ebp + 8]
call fcn.00407888
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x407a08
push 8
call fcn.004080c3
pop ecx
ret
call fcn.00406c07
ret
Function at 0x40ac6f
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x42a874]
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 + 0x42ae20]
je 0x40aca4
inc eax
cmp eax, 0x13
jb 0x40ac95
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x42ae20]
jne 0x40adca
mov eax, dword [0x42d890]
cmp eax, 1
je 0x40ada2
cmp eax, edx
jne 0x40acd4
cmp dword [0x42a884], 1
je 0x40ada2
cmp ecx, 0xfc
je 0x40adca
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 0x40ad0a
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00409a00
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.004070d0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40ad3e
mov eax, edi
push eax
call fcn.004070d0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x42373c
push edi
call fcn.0040cd10
add esp, 0x10
push edi
call fcn.004070d0
push dword [esi + 0x42ae24]
mov ebx, eax
call fcn.004070d0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00406790
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00409a00
push edi
push ebx
call fcn.00409a10
push 0x423738
push ebx
call fcn.00409a10
push dword [esi + 0x42ae24]
push ebx
call fcn.00409a10
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040cc15
add esp, 0x2c
jmp 0x40adca
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x42ae24]
push dword [esi]
call fcn.004070d0
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.004064ce
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x40b600
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 0x40b62e
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 0x40b635
cmp ebx, dword [eax + 4]
jae 0x40b635
xor eax, eax
jmp 0x40b825
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x40b646
xor eax, eax
inc eax
jmp 0x40b824
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x40b65c
cmp ecx, edx
jae 0x40b7a1
cmp dword [eax + 4], 0
je 0x40b665
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x40b64d
cmp dword [ebp + 8], 0
je 0x40b687
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x40b7a1
cmp eax, esi
jae 0x40b7a1
mov eax, dword [0x42db88]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x40b6ac
cmp dword [esi*4 + 0x42db90], edi
je 0x40b7a5
inc esi
cmp esi, eax
jl 0x40b69a
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40b821
cmp dword [ebp - 8], 0x1000000
jne 0x40b821
test byte [ebp - 0xc], 0xcc
je 0x40b72a
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x40b821
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x40b821
cmp word [eax + 0x18], 0x10b
jne 0x40b821
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x40b821
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x40b72a
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x40b72a
test byte [ecx + 0x27], 0x80
jne 0x40b7a1
push 1
push 0x42dbd0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x40b63e
mov ecx, dword [0x42db88]
test ecx, ecx
mov edx, ecx
jle 0x40b75e
lea eax, [ecx*4 + 0x42db8c]
cmp dword [eax], edi
je 0x40b75e
dec edx
sub eax, 4
test edx, edx
jg 0x40b752
test edx, edx
jne 0x40b78f
push 0xf
pop ebx
cmp ecx, ebx
jg 0x40b76b
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x40b783
lea eax, [edx*4 + 0x42db90]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x40b771
cmp ecx, 0x10
jge 0x40b78f
inc ecx
mov dword [0x42db88], ecx
push 0
push 0x42dbd0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x40b63e
xor eax, eax
jmp 0x40b824
test esi, esi
jle 0x40b63e
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x42dbd0
call ebx
test eax, eax
jne 0x40b63e
cmp dword [esi*4 + 0x42db90], edi
je 0x40b7fb
mov eax, dword [0x42db88]
lea esi, [eax - 1]
test esi, esi
jl 0x40b7e9
cmp dword [esi*4 + 0x42db90], edi
je 0x40b7e5
dec esi
jns 0x40b7d9
test esi, esi
jge 0x40b7f9
cmp eax, 0x10
jge 0x40b7f4
inc eax
mov dword [0x42db88], eax
lea esi, [eax - 1]
jmp 0x40b7fb
je 0x40b813
xor ecx, ecx
test esi, esi
jl 0x40b813
lea eax, [ecx*4 + 0x42db90]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x40b801
push 0
push 0x42dbd0
call ebx
jmp 0x40b63e
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40cc15
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x42dcdc], ebx
push esi
push edi
jne 0x40cc95
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x40ccd0
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4240b4
push edi
call esi
test eax, eax
mov dword [0x42dcdc], eax
je 0x40ccd0
push str.GetActiveWindow
push edi
call esi
push 0x424090
push edi
mov dword [0x42dce0], eax
call esi
cmp dword [0x42d8a4], 2
mov dword [0x42dce4], eax
jne 0x40cc95
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x42dcec], eax
je 0x40cc95
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x42dce8], eax
mov eax, dword [0x42dce8]
test eax, eax
je 0x40ccda
call eax
test eax, eax
je 0x40ccc1
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x42dcec]
test eax, eax
je 0x40ccc1
test byte [ebp - 8], 1
jne 0x40ccda
cmp dword [0x42d8b0], 4
jb 0x40ccd4
or byte [ebp + 0x12], 0x20
jmp 0x40ccf9
xor eax, eax
jmp 0x40cd09
or byte [ebp + 0x12], 4
jmp 0x40ccf9
mov eax, dword [0x42dce0]
test eax, eax
je 0x40ccf9
call eax
mov ebx, eax
test ebx, ebx
je 0x40ccf9
mov eax, dword [0x42dce4]
test eax, eax
je 0x40ccf9
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x42dcdc]
pop edi
pop esi
pop ebx
leave
ret