joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405820
Capabilities:
Access the windows event log
Create service
Persist via windows service
Set registry value

Disassembly:
sub esp, 0x224
push ebp
push esi
push 0xf003f
push 0
mov ebp, ecx
push 0
mov dword [esp + 0x24], ebp
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
test esi, esi
mov dword [esp + 0x10], esi
je 0x405894
push 0x104
lea eax, [esp + 0x2c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
push 0
push 0x41770c
push 0
push 0
lea ecx, [esp + 0x3c]
push ecx
push 1
push 2
push 0x110
push 0xf01ff
add ebp, 4
push ebp
push ebp
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
test eax, eax
mov dword [esp + 0xc], eax
jne 0x40589f
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
xor eax, eax
pop ebp
add esp, 0x224
ret
push edi
mov ecx, 0xe
mov esi, str.SYSTEMCurrentControlSetServicesEventLogApplication_
lea edi, [esp + 0x130]
mov eax, ebp
mov dword [esp + 0xc], 0
rep movsd dword es:[edi], dword [esi]
mov edx, eax
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4058c0
lea edi, [esp + 0x130]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4058d1
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea edx, [esp + 0xc]
push edx
lea eax, [esp + 0x134]
push eax
and ecx, 3
push 0x80000002
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x405925
mov ecx, dword [esp + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ecx
call esi
mov edx, dword [esp + 0x14]
push edx
call esi
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x224
ret
lea eax, [esp + 0x2c]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405930
mov ecx, dword [esp + 0xc]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
sub eax, edx
inc eax
push eax
lea eax, [esp + 0x30]
push eax
push 2
push 0
push str.EventMessageFile
push ecx
call esi
mov eax, dword [esp + 0xc]
push 4
lea edx, [esp + 0x1c]
push edx
push 4
push 0
push str.TypesSupported
push eax
mov dword [esp + 0x30], 7
call esi
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebp
xor esi, esi
test eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
je 0x4059a1
mov esi, 1
mov edi, dword [esp + 0x1c]
mov eax, dword [edi + 0x70]
test eax, eax
jne 0x4059b8
push ebp
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov dword [edi + 0x70], eax
mov eax, dword [edi + 0x70]
test eax, eax
je 0x4059d8
push 0
lea edx, [esp + 0x24]
push edx
push 0
push esi
push 0
push 0x64
push 0
push 4
push eax
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
mov eax, dword [esp + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call esi
mov ecx, dword [esp + 0x14]
push ecx
call esi
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x224
ret
Function at 0x405a00
Capabilities:
Access the windows event log
Delete service

Disassembly:
sub esp, 0x18
push ebx
push ebp
push edi
push 0xf003f
xor ebx, ebx
push ebx
push ebx
mov edi, ecx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebp, eax
cmp ebp, ebx
mov dword [esp + 0x14], ebp
jne 0x405a2a
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret
push esi
push 0x10000
lea esi, [edi + 4]
push esi
push ebp
mov dword [esp + 0x1c], ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
cmp eax, ebx
mov dword [esp + 0x14], eax
je 0x405ae9
push eax
call dword [sym.imp.ADVAPI32.dll_DeleteService]
xor ebp, ebp
test eax, eax
mov eax, esi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], eax
je 0x405aa5
cmp eax, ebx
je 0x405a6f
mov ebp, 1
cmp dword [edi + 0x70], ebx
jne 0x405a7f
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov dword [edi + 0x70], eax
mov edi, dword [edi + 0x70]
cmp edi, ebx
je 0x405a9b
push ebx
lea eax, [esp + 0x20]
push eax
push ebx
push ebp
push ebx
push 0x65
push ebx
push 4
push edi
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
mov dword [esp + 0x10], 1
jmp 0x405ada
cmp eax, ebx
je 0x405aae
mov ebp, 1
cmp dword [edi + 0x70], ebx
jne 0x405abe
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov dword [edi + 0x70], eax
mov edi, dword [edi + 0x70]
cmp edi, ebx
je 0x405ada
push ebx
lea ecx, [esp + 0x20]
push ecx
push ebx
push ebp
push ebx
push 0x66
push ebx
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebp, dword [esp + 0x18]
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x10]
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x18
ret
Function at 0x405b40
Capabilities:
Access the windows event log

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov esi, ecx
push str.Entering_CNTService::Initialize__
push esi
call fcn.00405760
mov eax, dword [esi + 0x4c]
push 2
push eax
push str.CNTService::SetStatus__lu___lu_
push esi
call fcn.00405760
mov ecx, dword [esi + 0x4c]
add esp, 0x18
lea ebx, [esi + 0x50]
push ebx
push ecx
mov dword [esi + 0x54], 2
call dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 8]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebp, ebp
cmp edi, ebp
mov dword [esi + 0x5c], eax
mov eax, dword [esi + 0x70]
mov dword [esi + 0x64], ebp
mov dword [esi + 0x68], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], ebp
jne 0x405c08
cmp eax, ebp
jne 0x405bbc
lea eax, [esi + 4]
push eax
push ebp
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov dword [esi + 0x70], eax
mov eax, dword [esi + 0x70]
cmp eax, ebp
je 0x405bd8
push ebp
lea ecx, [esp + 0x14]
push ecx
push ebp
push ebp
push ebp
push 0x68
push ebp
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
mov edx, dword [esi + 0x4c]
push 1
push edx
push str.CNTService::SetStatus__lu___lu_
push esi
call fcn.00405760
mov eax, dword [esi + 0x4c]
add esp, 0x10
push ebx
push eax
mov dword [esi + 0x54], 1
call dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret
cmp eax, ebp
jne 0x405c1a
lea ecx, [esi + 4]
push ecx
push ebp
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov dword [esi + 0x70], eax
mov eax, dword [esi + 0x70]
cmp eax, ebp
je 0x405c36
push ebp
lea edx, [esp + 0x14]
push edx
push ebp
push ebp
push ebp
push 0x69
push ebp
push 4
push eax
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
mov eax, dword [esi + 0x4c]
push 4
push eax
push str.CNTService::SetStatus__lu___lu_
push esi
call fcn.00405760
mov ecx, dword [esi + 0x4c]
add esp, 0x10
push ebx
push ecx
mov dword [esi + 0x54], 4
call dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
push str.Leaving_CNTService::Initialize__
push esi
call fcn.00405760
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xc
ret
Function at 0x406270
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x98
push esi
push edi
xor eax, eax
mov ecx, 0x25
lea edi, [esp + 8]
rep stosd dword es:[edi], eax
lea eax, [esp + 8]
push eax
mov dword [esp + 0xc], 0x94
mov esi, 1
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp eax, esi
jne 0x406320
mov eax, dword [esp + 0x18]
sub eax, 0
je 0x406315
dec eax
je 0x4062dc
dec eax
jne 0x406320
cmp dword [esp + 0xc], 5
jae 0x4062c8
mov eax, 0x10
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x10]
xor eax, eax
test edx, edx
setne al
add eax, 0x11
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0xc]
cmp eax, 4
ja 0x40630a
jne 0x4062ff
mov eax, dword [esp + 0x10]
cmp eax, 0xa
ja 0x40630a
test eax, eax
jbe 0x4062ff
mov eax, 3
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, 2
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, 4
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40a4f4
Capabilities:
Accept command line arguments

Disassembly:
push 0x60
push 0x4180c0
call fcn.0040d4f4
and dword [ebp - 4], 0
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
or dword [ebp - 4], 0xffffffff
mov ebx, 0x94
push ebx
push 0
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x40a6ab
mov dword [esi], ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
push esi
push 0
test eax, eax
jne 0x40a551
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x40a6ab
mov eax, dword [esi + 0x10]
mov dword [0x47d07c], eax
mov eax, dword [esi + 4]
mov dword [0x47d088], eax
mov eax, dword [esi + 8]
mov dword [0x47d08c], eax
mov eax, dword [esi + 0xc]
and eax, 0x7fff
mov dword [0x47d080], eax
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [0x47d07c], 2
je 0x40a58f
or byte [0x47d081], 0x80
mov eax, dword [0x47d088]
shl eax, 8
add eax, dword [0x47d08c]
mov dword [0x47d084], eax
call fcn.0040a498
mov dword [ebp - 0x1c], eax
xor ebx, ebx
inc ebx
push ebx
call fcn.0040e2a7
pop ecx
test eax, eax
jne 0x40a5c0
push 0x1c
call fcn.0040a46f
pop ecx
call fcn.0040c43f
test eax, eax
jne 0x40a5d1
push 0x10
call fcn.0040a46f
pop ecx
mov dword [ebp - 4], ebx
call fcn.0040e02b
test eax, eax
jge 0x40a5e5
push 0x1b
call fcn.0040a445
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x47ebcc], eax
call fcn.0040df03
mov dword [0x47d040], eax
call fcn.0040de60
test eax, eax
jge 0x40a60b
push 8
call fcn.0040a445
pop ecx
call fcn.0040dc12
test eax, eax
jge 0x40a61c
push 9
call fcn.0040a445
pop ecx
call fcn.0040d6ce
mov dword [ebp - 0x28], eax
test eax, eax
je 0x40a62f
push eax
call fcn.0040a445
pop ecx
call fcn.0040dbb3
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], bl
je 0x40a642
movzx eax, word [ebp - 0x40]
jmp 0x40a645
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push 0
push 0x400000
call fcn.004055a0
mov esi, eax
mov dword [ebp - 0x2c], esi
cmp dword [ebp - 0x1c], 0
jne 0x40a666
push esi
call fcn.0040d7d4
call fcn.0040d800
jmp 0x40a698
or dword [ebp - 4], 0xffffffff
mov eax, esi
jmp 0x40a6b0
mov eax, 0xff
call fcn.0040d52f
ret
Function at 0x40d81e
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
mov ecx, dword [ebp + 8]
xor eax, eax
cmp ecx, dword [eax*8 + 0x47c760]
je 0x40d838
inc eax
cmp eax, 0x13
jb 0x40d829
push esi
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x47c760]
mov dword [ebp + 8], esi
jne 0x40d97e
mov eax, dword [0x47d048]
cmp eax, 1
push ebx
je 0x40d94e
test eax, eax
jne 0x40d86d
cmp dword [0x47c2a4], 1
je 0x40d94e
cmp ecx, 0xfc
je 0x40d97d
push edi
push 6
pop ecx
mov esi, str.Runtime_Error__n_nProgram:
mov edi, 0x47d0c0
rep movsd dword es:[edi], dword [esi]
push 0x104
mov ebx, 0x47d0da
push ebx
movsw word es:[edi], word [esi]
push 0
mov byte [0x47d1de], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40d8bb
push 5
pop ecx
mov esi, str._program_name_unknown_
mov edi, 0x47d0da
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40d8c0
sub eax, edx
inc eax
cmp eax, 0x3c
jbe 0x40d8f3
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40d8d4
sub eax, edx
push 3
lea eax, [eax + 0x47d09f]
push 0x4187d4
push eax
call fcn.00409bf0
add esp, 0xc
mov edx, 0x47d0c0
mov edi, edx
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40d8fb
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x47c764]
mov esi, 0x4187d0
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40d916
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40d922
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x12010
mov ecx, eax
and ecx, 3
push str.Microsoft_Visual_C_Runtime_Library
push edx
rep movsb byte es:[edi], byte [esi]
call fcn.00413789
add esp, 0xc
pop edi
jmp 0x40d97d
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x40d97d
mov esi, dword [esi + 0x47c764]
mov ecx, esi
lea edx, [ecx + 1]
mov bl, byte [ecx]
inc ecx
test bl, bl
jne 0x40d965
push 0
sub ecx, edx
lea edx, [ebp - 4]
push edx
push ecx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebx
pop esi
leave
ret
Function at 0x40df03
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x47d4e0]
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
push edi
xor ebx, ebx
xor edi, edi
cmp eax, ebx
jne 0x40df4f
call esi
mov edi, eax
cmp edi, ebx
je 0x40df35
mov dword [0x47d4e0], 1
jmp 0x40df54
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x40df4a
push 2
pop eax
mov dword [0x47d4e0], eax
jmp 0x40df4f
mov eax, dword [0x47d4e0]
cmp eax, 1
jne 0x40dfcc
cmp edi, ebx
jne 0x40df60
call esi
mov edi, eax
cmp edi, ebx
je 0x40dfd5
cmp word [edi], bx
mov eax, edi
je 0x40df75
inc eax
inc eax
cmp word [eax], bx
jne 0x40df67
inc eax
inc eax
cmp word [eax], bx
jne 0x40df67
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebx
push ebx
push ebx
sub eax, edi
push ebx
sar eax, 1
inc eax
push eax
push edi
push ebx
push ebx
mov dword [ebp - 0xc], eax
call esi
mov ecx, eax
cmp ecx, ebx
mov dword [ebp - 8], ecx
je 0x40dfc3
call fcn.0040f8ed
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x40dfc3
push ebx
push ebx
push dword [ebp - 8]
push eax
push dword [ebp - 0xc]
push edi
push ebx
push ebx
call esi
test eax, eax
jne 0x40dfc0
push dword [ebp - 4]
call fcn.0040a6b6
pop ecx
mov dword [ebp - 4], ebx
mov ebx, dword [ebp - 4]
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x40e024
cmp eax, 2
je 0x40dfd9
cmp eax, ebx
je 0x40dfd9
xor eax, eax
jmp 0x40e026
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov esi, eax
cmp esi, ebx
mov dword [ebp - 4], esi
je 0x40dfd5
cmp byte [esi], bl
je 0x40dff6
inc eax
cmp byte [eax], bl
jne 0x40dfec
inc eax
cmp byte [eax], bl
jne 0x40dfec
sub eax, esi
inc eax
mov edi, eax
mov ecx, edi
call fcn.0040f8ed
cmp eax, ebx
je 0x40e01d
mov ecx, edi
mov edx, ecx
shr ecx, 2
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 4]
mov ebx, eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40f613
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x41c
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], edi
jne 0x40f633
xor eax, eax
jmp 0x40f7a1
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x47daa0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x40f666
push 2
push edi
push edi
push dword [ebp + 8]
call fcn.00413f64
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40f738
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], edi
jbe 0x40f770
mov ecx, dword [ebp - 0xc]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x41c]
mov dword [ebp - 8], edi
cmp ecx, dword [ebp + 0x10]
jae 0x40f6c1
mov edx, dword [ebp - 0xc]
inc dword [ebp - 0xc]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40f6b2
inc dword [ebp - 0x14]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 8]
mov byte [eax], dl
inc eax
inc dword [ebp - 8]
cmp dword [ebp - 8], 0x400
jl 0x40f695
mov edi, eax
lea eax, [ebp - 0x41c]
sub edi, eax
push 0
lea eax, [ebp - 0x18]
push eax
push edi
lea eax, [ebp - 0x41c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40f701
mov eax, dword [ebp - 0x18]
add dword [ebp - 0x10], eax
cmp eax, edi
jl 0x40f70a
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x40f686
jmp 0x40f70c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
xor edi, edi
mov eax, dword [ebp - 0x10]
cmp eax, edi
jne 0x40f79c
cmp dword [ebp - 4], edi
je 0x40f770
push 5
pop esi
cmp dword [ebp - 4], esi
jne 0x40f765
call fcn.00413a76
mov dword [eax], 9
call fcn.00413a89
mov dword [eax], esi
jmp 0x40f797
push edi
lea ecx, [ebp - 0x18]
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40f75a
mov eax, dword [ebp - 0x18]
mov dword [ebp - 4], edi
mov dword [ebp - 0x10], eax
jmp 0x40f70c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jmp 0x40f70c
push dword [ebp - 4]
call fcn.00413a9c
pop ecx
jmp 0x40f797
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40f785
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x40f785
xor eax, eax
jmp 0x40f79f
call fcn.00413a76
mov dword [eax], 0x1c
call fcn.00413a89
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x40f79f
sub eax, dword [ebp - 0x14]
pop esi
pop ebx
pop edi
leave
ret
Function at 0x41355e
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
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 0x41358e
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 0x413595
cmp ebx, dword [eax + 4]
jae 0x413595
xor eax, eax
jmp 0x413785
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x4135a6
xor eax, eax
inc eax
jmp 0x413784
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x4135bc
cmp ecx, edx
jae 0x413701
cmp dword [eax + 4], 0
je 0x4135c5
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x4135ad
cmp dword [ebp + 8], 0
je 0x4135e7
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x413701
cmp eax, esi
jae 0x413701
mov eax, dword [0x47d6c0]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x41360c
cmp dword [esi*4 + 0x47d6c8], edi
je 0x413705
inc esi
cmp esi, eax
jl 0x4135fa
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x413781
cmp dword [ebp - 8], 0x1000000
jne 0x413781
test byte [ebp - 0xc], 0xcc
je 0x41368a
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x413781
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x413781
cmp word [eax + 0x18], 0x10b
jne 0x413781
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x413781
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x41368a
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x41368a
test byte [ecx + 0x27], 0x80
jne 0x413701
push 1
push 0x47d708
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x41359e
mov ecx, dword [0x47d6c0]
test ecx, ecx
mov edx, ecx
jle 0x4136be
lea eax, [ecx*4 + 0x47d6c4]
cmp dword [eax], edi
je 0x4136be
dec edx
sub eax, 4
test edx, edx
jg 0x4136b2
test edx, edx
jne 0x4136ef
push 0xf
pop ebx
cmp ecx, ebx
jg 0x4136cb
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x4136e3
lea eax, [edx*4 + 0x47d6c8]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x4136d1
cmp ecx, 0x10
jge 0x4136ef
inc ecx
mov dword [0x47d6c0], ecx
push 0
push 0x47d708
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x41359e
xor eax, eax
jmp 0x413784
test esi, esi
jle 0x41359e
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x47d708
call ebx
test eax, eax
jne 0x41359e
cmp dword [esi*4 + 0x47d6c8], edi
je 0x41375b
mov eax, dword [0x47d6c0]
lea esi, [eax - 1]
test esi, esi
jl 0x413749
cmp dword [esi*4 + 0x47d6c8], edi
je 0x413745
dec esi
jns 0x413739
test esi, esi
jge 0x413759
cmp eax, 0x10
jge 0x413754
inc eax
mov dword [0x47d6c0], eax
lea esi, [eax - 1]
jmp 0x41375b
je 0x413773
xor ecx, ecx
test esi, esi
jl 0x413773
lea eax, [ecx*4 + 0x47d6c8]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x413761
push 0
push 0x47d708
call ebx
jmp 0x41359e
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x413789
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x47d70c], ebx
push esi
push edi
jne 0x41380b
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x413846
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x47d70c], eax
je 0x413846
push 0x41a0f4
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x47d710], eax
call esi
cmp dword [0x47d07c], 2
mov dword [0x47d714], eax
jne 0x41380b
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x47d71c], eax
je 0x41380b
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x47d718], eax
mov eax, dword [0x47d718]
test eax, eax
je 0x413850
call eax
test eax, eax
je 0x413837
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x47d71c]
test eax, eax
je 0x413837
test byte [ebp - 8], 1
jne 0x413850
cmp dword [0x47d088], 4
jb 0x41384a
or byte [ebp + 0x12], 0x20
jmp 0x41386f
xor eax, eax
jmp 0x41387f
or byte [ebp + 0x12], 4
jmp 0x41386f
mov eax, dword [0x47d710]
test eax, eax
je 0x41386f
call eax
mov ebx, eax
test ebx, ebx
je 0x41386f
mov eax, dword [0x47d714]
test eax, eax
je 0x41386f
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x47d70c]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x41493d
Capabilities:
Get system information on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x50
push ebx
push esi
push edi
push 4
pop eax
call fcn.00409d20
mov dword [ebp - 8], esp
push 0x1c
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x414a39
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov edi, dword [ebp - 0x4c]
xor esi, esi
cmp dword [0x47d07c], 2
jne 0x4149be
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp eax, esi
je 0x4149be
push str.SetThreadStackGuarantee
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, esi
je 0x4149be
lea ecx, [ebp - 4]
push ecx
mov dword [ebp - 4], esi
call eax
cmp eax, 1
pop ecx
jne 0x4149be
cmp dword [ebp - 4], esi
jbe 0x4149be
mov esi, dword [ebp - 4]
mov edx, dword [0x47d07c]
mov ebx, edx
dec ebx
neg ebx
sbb ebx, ebx
and ebx, 0x103
lea ecx, [edi - 1]
lea eax, [esi + edi - 1]
not ecx
inc ebx
and eax, ecx
mov dword [ebp - 4], eax
je 0x4149e7
add eax, edi
mov dword [ebp - 4], eax
lea ecx, [edi + edi]
cmp eax, ecx
jae 0x4149f3
mov dword [ebp - 4], ecx
mov eax, ecx
lea esi, [edi - 1]
not esi
and esi, dword [ebp - 8]
sub esi, eax
cmp edx, 1
jne 0x414a05
push 0x11
pop edi
mov ecx, dword [ebp - 0xc]
add edi, ecx
cmp esi, edi
jb 0x414a39
push 4
push 0x1000
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
je 0x414a39
lea eax, [ebp - 0x10]
push eax
push ebx
push dword [ebp - 4]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x414a39
xor eax, eax
inc eax
jmp 0x414a3b
xor eax, eax
lea esp, [ebp - 0x5c]
pop edi
pop esi
pop ebx
leave
ret