joyce8/EMBER2024-capa huggingface dataset:
Function at 0x408190
Capabilities:
Access the windows event log

Disassembly:
sub esp, 0x108
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.IPerfService
push 0
mov dword [0x41b39c], eax
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov edi, dword [esp + 0x114]
push edi
mov esi, eax
call fcn.004090a5
mov eax, dword [0x41b39c]
push eax
push str.IPerfService
lea ecx, [esp + 0x1c]
push str._s_error:__d
push ecx
call fcn.0040a19e
add esp, 0x14
test esi, esi
lea edx, [esp + 0x10]
mov dword [esp + 8], edx
mov dword [esp + 0xc], edi
je 0x40820d
push 0
lea eax, [esp + 0xc]
push eax
push 0
push 2
push 0
push 0
push 0
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
pop edi
pop esi
add esp, 0x108
ret

Function at 0x408330
Capabilities:
Create service
Query service status
Start service

Disassembly:
sub esp, 0x204
push 0x200
lea eax, [esp + 8]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x408375
push 0x100
push 0x41b820
call fcn.00408220
push eax
push str.IPerf_Service
push str.Unable_to_install__s____s_n
call fcn.004090a5
add esp, 0x14
add esp, 0x204
ret
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x40847c
push ebx
push esi
push 0xf01ff
push str.IPerfService
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x4083d6
push eax
push eax
push 0x417713
push eax
push eax
lea ecx, [esp + 0x24]
push ecx
push 1
push 3
push 0x10
push 0xf01ff
push str.IPerf_Service
push str.IPerfService
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov esi, eax
jmp 0x4083e8
push str.IPerf_Service
push str._s_already_installed._n
call fcn.004090a5
add esp, 8
test esi, esi
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
je 0x408452
push 0x41b940
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x408442
cmp dword [0x41b944], 1
jne 0x408428
mov edx, dword [esp + 0x218]
mov eax, dword [esp + 0x214]
add edx, 4
push edx
dec eax
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
jmp 0x40842c
mov eax, dword [esp + 0xc]
test eax, eax
je 0x408442
push str.IPerf_Service
push str._s_started._n
call fcn.004090a5
add esp, 8
push esi
call ebx
push edi
call ebx
pop esi
pop ebx
pop edi
add esp, 0x204
ret
push 0x100
push 0x41b820
call fcn.00408220
push eax
push str.CreateService_failed____s_n
call fcn.004090a5
add esp, 0x10
push edi
call ebx
pop esi
pop ebx
pop edi
add esp, 0x204
ret
push 0x100
push 0x41b820
call fcn.00408220
push eax
push str.OpenSCManager_failed____s_n
call fcn.004090a5
add esp, 0x10
pop edi
add esp, 0x204
ret
Function at 0x4084b0
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
push ecx
push ebp
push edi
push 0xf003f
xor edi, edi
push edi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebp, eax
test ebp, ebp
je 0x4085e1
push esi
push 0xf01ff
push str.IPerfService
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
je 0x4085d3
push 0x41b940
push 1
push esi
mov dword [esp + 0x18], 1
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x40858c
push ebx
push str.IPerf_Service
push str.Stopping__s.
call fcn.004090a5
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 8
push 0x3e8
call edi
mov ebx, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
push 0x41b940
push esi
call ebx
test eax, eax
je 0x408569
jmp 0x408540
cmp dword [0x41b944], 3
jne 0x408569
push 0x417a50
call fcn.004090a5
add esp, 4
push 0x3e8
call edi
push 0x41b940
push esi
call ebx
test eax, eax
jne 0x408540
cmp dword [0x41b944], 1
pop ebx
push str.IPerf_Service
jne 0x40857f
push str._n_s_stopped._n
jmp 0x408584
push str._n_s_failed_to_stop._n
call fcn.004090a5
add esp, 8
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x4085ab
push str.IPerf_Service
push str._s_removed._n
call fcn.004090a5
add esp, 8
jmp 0x4085c8
push 0x100
push 0x41b820
call fcn.00408220
push eax
push str.DeleteService_failed____s_n
call fcn.004090a5
add esp, 0x10
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, dword [esp + 0xc]
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
mov eax, edi
pop edi
pop ebp
pop ecx
ret
push 0x100
push 0x41b820
call fcn.00408220
push eax
push str.OpenSCManager_failed____s_n
call fcn.004090a5
add esp, 0x10
mov eax, edi
pop edi
pop ebp
pop ecx
ret

Function at 0x408610
Capabilities:
Query service status
Start service

Disassembly:
push ecx
push ebx
push edi
push 0xf003f
xor ebx, ebx
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x4086a3
push esi
push 0xf01ff
push str.IPerfService
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
je 0x408695
push 0x41b940
push esi
mov ebx, 1
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x40868e
cmp dword [0x41b944], ebx
jne 0x408674
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
add eax, 4
push eax
dec ecx
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
jmp 0x408678
mov eax, dword [esp + 0xc]
test eax, eax
je 0x40868e
push str.IPerf_Service
push str._s_started._n
call fcn.004090a5
add esp, 8
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
pop edi
mov eax, ebx
pop ebx
pop ecx
ret
push 0x100
push 0x41b820
call fcn.00408220
push eax
push str.OpenSCManager_failed____s_n
call fcn.004090a5
add esp, 0x10
pop edi
mov eax, ebx
pop ebx
pop ecx
ret

Function at 0x408810
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x41b3ac]
mov ecx, eax
inc eax
test ecx, ecx
mov dword [0x41b3ac], eax
jne 0x408831
push ecx
call fcn.004097a8
add esp, 4
push 0
call fcn.004095b8
ret
Function at 0x4094e5
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push 8
call fcn.0040cc52
xor esi, esi
inc esi
cmp dword [0x41b3f4], esi
pop ecx
jne 0x40950d
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 [0x41b3f0], esi
mov byte [0x41b3ec], al
jne 0x409573
mov ecx, dword [0x41cd0c]
test ecx, ecx
je 0x409554
mov eax, dword [0x41cd08]
sub eax, 4
cmp eax, ecx
jmp 0x40954d
mov eax, dword [eax]
test eax, eax
je 0x40953f
call eax
mov eax, dword [0x41cd08]
sub eax, 4
cmp eax, dword [0x41cd0c]
mov dword [0x41cd08], eax
jae 0x409537
mov eax, 0x41a034
mov esi, 0x41a03c
cmp eax, esi
mov edi, eax
jae 0x409573
mov eax, dword [edi]
test eax, eax
je 0x40956c
call eax
add edi, 4
cmp edi, esi
jb 0x409564
mov eax, 0x41a040
mov esi, 0x41a048
cmp eax, esi
mov edi, eax
jae 0x409592
mov eax, dword [edi]
test eax, eax
je 0x40958b
call eax
add edi, 4
cmp edi, esi
jb 0x409583
cmp dword [ebp + 0x10], 0
pop edi
pop esi
je 0x4095a3
push 8
call fcn.0040cbbe
jmp 0x4095b5
push dword [ebp + 8]
mov dword [0x41b3f4], 1
call fcn.0040943e
pop ecx
pop ebp
ret
Function at 0x40a8d6
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x18
push 0x417d50
call fcn.0040be3c
mov edi, 0x94
mov eax, edi
call fcn.00409ad0
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 [0x41b3b4], ecx
mov eax, dword [esi + 4]
mov dword [0x41b3c0], eax
mov edx, dword [esi + 8]
mov dword [0x41b3c4], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x41b3b8], esi
cmp ecx, 2
je 0x40a936
or esi, 0x8000
mov dword [0x41b3b8], esi
shl eax, 8
add eax, edx
mov dword [0x41b3bc], eax
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp word [eax], 0x5a4d
jne 0x40a96f
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40a96f
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40a987
cmp eax, 0x20b
je 0x40a974
mov dword [ebp - 0x1c], edi
jmp 0x40a99b
cmp dword [ecx + 0x84], 0xe
jbe 0x40a96f
xor eax, eax
cmp dword [ecx + 0xf8], edi
jmp 0x40a995
cmp dword [ecx + 0x74], 0xe
jbe 0x40a96f
xor eax, eax
cmp dword [ecx + 0xe8], edi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0040df59
pop ecx
test eax, eax
jne 0x40a9af
push 0x1c
call fcn.0040a8b2
pop ecx
call fcn.0040b3ef
test eax, eax
jne 0x40a9c0
push 0x10
call fcn.0040a8b2
pop ecx
call fcn.0040cc83
mov dword [ebp - 4], edi
call fcn.0040d4a5
test eax, eax
jge 0x40a9d9
push 0x1b
call fcn.0040a88d
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x41bce0], eax
call fcn.0040fcf3
mov dword [0x41b404], eax
call fcn.0040fc51
test eax, eax
jge 0x40a9ff
push 8
call fcn.0040a88d
pop ecx
call fcn.0040fa1e
test eax, eax
jge 0x40aa10
push 9
call fcn.0040a88d
pop ecx
call fcn.00409480
mov dword [ebp - 0x20], eax
cmp eax, edi
je 0x40aa23
push eax
call fcn.0040a88d
pop ecx
mov eax, dword [0x41b3d4]
mov dword [0x41b3d8], eax
push eax
push dword [0x41b3cc]
push dword [0x41b3c8]
call fcn.00407ef0
add esp, 0xc
mov esi, eax
mov dword [ebp - 0x24], esi
cmp dword [ebp - 0x1c], edi
jne 0x40aa52
push esi
call fcn.004095b8
call fcn.004095da
jmp 0x40aa84
or dword [ebp - 4], 0xffffffff
mov eax, esi
lea esp, [ebp - 0x34]
call fcn.0040be77
ret
Function at 0x40c33c
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x40c502
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x41bbe0]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x40c502
test cl, 0x48
je 0x40c3a2
mov al, byte [eax + 5]
cmp al, 0xa
je 0x40c3a2
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40c3f4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x40c3dc
call fcn.00409f14
mov dword [eax], 9
call fcn.00409f1d
mov dword [eax], esi
jmp 0x40c3ec
cmp eax, 0x6d
je 0x40c502
push eax
call fcn.00409f26
pop ecx
or eax, 0xffffffff
jmp 0x40c504
mov eax, dword [edi]
mov edx, dword [ebp - 0xc]
add dword [ebp - 8], edx
lea ecx, [eax + esi + 4]
mov al, byte [ecx]
test al, al
jns 0x40c4fd
test edx, edx
je 0x40c417
cmp byte [ebx], 0xa
jne 0x40c417
or al, 4
jmp 0x40c419
and al, 0xfb
mov byte [ecx], al
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x40c4f7
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x40c4e7
cmp al, 0xd
je 0x40c44d
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x40c4d9
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x40c467
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x40c462
add dword [ebp + 0x10], 2
jmp 0x40c4bb
mov dword [ebp + 0x10], eax
jmp 0x40c4d5
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40c48f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40c4d5
cmp dword [ebp - 0xc], 0
je 0x40c4d5
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x40c4b0
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40c4bb
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x40c4d8
cmp ebx, dword [ebp + 0xc]
jne 0x40c4c0
cmp byte [ebp - 1], 0xa
jne 0x40c4c0
mov byte [ebx], 0xa
jmp 0x40c4d8
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00410e71
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x40c4d9
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x40c431
jmp 0x40c4f7
mov eax, dword [edi]
lea esi, [eax + esi + 4]
mov al, byte [esi]
test al, 0x40
jne 0x40c4f7
or al, 2
mov byte [esi], al
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x40c504
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40d199
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x41aa18]
xor eax, dword [ebp + 4]
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], edi
jne 0x40d1c2
xor eax, eax
jmp 0x40d330
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 + 0x41bbe0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x40d1f5
push 2
push edi
push edi
push dword [ebp + 8]
call fcn.0041183c
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40d2c7
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], edi
jbe 0x40d302
mov ecx, dword [ebp - 0x10]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x420]
mov dword [ebp - 0xc], edi
cmp ecx, dword [ebp + 0x10]
jae 0x40d250
mov edx, dword [ebp - 0x10]
inc dword [ebp - 0x10]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40d241
inc dword [ebp - 0x18]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0xc]
mov byte [eax], dl
inc eax
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0x400
jl 0x40d224
mov edi, eax
lea eax, [ebp - 0x420]
sub edi, eax
push 0
lea eax, [ebp - 0x1c]
push eax
push edi
lea eax, [ebp - 0x420]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40d290
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x14], eax
cmp eax, edi
jl 0x40d299
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x40d215
jmp 0x40d29b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
xor edi, edi
mov eax, dword [ebp - 0x14]
cmp eax, edi
jne 0x40d32b
cmp dword [ebp - 8], edi
je 0x40d302
push 5
pop esi
cmp dword [ebp - 8], esi
jne 0x40d2f4
call fcn.00409f14
mov dword [eax], 9
call fcn.00409f1d
mov dword [eax], esi
jmp 0x40d2fd
push edi
lea ecx, [ebp - 0x1c]
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40d2e9
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], eax
jmp 0x40d29b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
jmp 0x40d29b
push dword [ebp - 8]
call fcn.00409f26
pop ecx
or eax, 0xffffffff
jmp 0x40d32e
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40d317
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x40d317
xor eax, eax
jmp 0x40d32e
call fcn.00409f14
mov dword [eax], 0x1c
call fcn.00409f1d
mov dword [eax], edi
jmp 0x40d2fd
sub eax, dword [ebp - 0x18]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
call fcn.004105af
leave
ret
Function at 0x40f70a
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x41aa18]
xor eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 4], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x41a800]
je 0x40f737
inc eax
cmp eax, 0x12
jb 0x40f728
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x41a800]
jne 0x40f86b
mov eax, dword [0x41b40c]
cmp eax, 1
je 0x40f846
cmp eax, edx
jne 0x40f767
cmp dword [0x41a4c4], 1
je 0x40f846
cmp ecx, 0xfc
je 0x40f86b
push 0x104
lea eax, [ebp - 0x10c]
push eax
push edx
mov byte [ebp - 8], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40f7a0
lea eax, [ebp - 0x10c]
push str._program_name_unknown_
push eax
call fcn.00411430
pop ecx
pop ecx
lea eax, [ebp - 0x10c]
push eax
lea edi, [ebp - 0x10c]
call fcn.0040dde0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40f7e2
lea eax, [ebp - 0x10c]
push eax
call fcn.0040dde0
mov edi, eax
lea eax, [ebp - 0x10c]
sub eax, 0x3b
push 3
add edi, eax
push 0x418860
push edi
call fcn.0040a200
add esp, 0x10
push edi
call fcn.0040dde0
push dword [esi + 0x41a804]
mov ebx, eax
call fcn.0040dde0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00409ad0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00411430
push edi
push ebx
call fcn.00411440
push 0x418840
push ebx
call fcn.00411440
push dword [esi + 0x41a804]
push ebx
call fcn.00411440
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00412d1a
add esp, 0x2c
jmp 0x40f86b
push edx
lea eax, [ebp + 8]
push eax
lea esi, [esi + 0x41a804]
push dword [esi]
call fcn.0040dde0
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 - 0x118]
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
call fcn.004105af
pop edi
pop esi
pop ebx
leave
ret
Function at 0x411ad7
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
push 4
pop eax
call fcn.00409ad0
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x411b6c
mov edi, dword [ebp - 0x20]
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x44]
lea esi, [eax - 1]
not esi
and esi, ebx
sub esi, eax
mov dword [ebp - 4], eax
mov eax, dword [0x41b3b4]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
and ecx, 0xffff1000
add ecx, 0x11000
add ecx, edi
cmp esi, ecx
jb 0x411b6c
cmp eax, 1
je 0x411b84
mov ebx, edi
mov edi, 0x1000
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x411b6c
add ebx, dword [ebp - 0x18]
test dword [ebp - 0x14], edi
je 0x411b41
test byte [ebp - 0xf], 1
mov ebx, dword [ebp - 0x24]
je 0x411b68
xor eax, eax
inc eax
jmp 0x411ba0
cmp esi, ebx
jae 0x411b70
xor eax, eax
jmp 0x411ba0
push 4
push edi
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x41b3b4]
jmp 0x411b86
mov ebx, esi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 8]
push ecx
inc eax
push eax
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x54]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x412a0e
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
push esi
push edi
mov dword [ebp - 8], ebx
je 0x412a79
push 0x3d
push dword [ebp + 8]
call fcn.00413a2d
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
mov dword [ebp - 0xc], esi
je 0x412a79
cmp dword [ebp + 8], esi
je 0x412a79
xor eax, eax
cmp byte [esi + 1], al
sete al
mov dword [ebp - 4], eax
mov eax, dword [0x41b3d4]
cmp eax, dword [0x41b3d8]
jne 0x412a5f
mov edi, eax
call fcn.004129ad
mov dword [0x41b3d4], eax
cmp eax, ebx
jne 0x412ab8
cmp dword [ebp + 0xc], ebx
je 0x412a81
cmp dword [0x41b3dc], ebx
je 0x412a81
call fcn.0040deb9
test eax, eax
je 0x412ab8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
cmp dword [ebp - 4], ebx
jne 0x412bbc
push 4
call fcn.0040b553
cmp eax, ebx
pop ecx
mov dword [0x41b3d4], eax
je 0x412a79
mov dword [eax], ebx
cmp dword [0x41b3dc], ebx
jne 0x412ab8
push 4
call fcn.0040b553
cmp eax, ebx
pop ecx
mov dword [0x41b3dc], eax
je 0x412a79
mov dword [eax], ebx
mov ebx, dword [0x41b3d4]
mov edi, esi
mov esi, dword [ebp + 8]
sub edi, esi
push esi
call fcn.00412960
mov edi, eax
test edi, edi
pop ecx
jl 0x412b11
cmp dword [ebx], 0
je 0x412b11
lea esi, [ebx + edi*4]
push dword [esi]
call fcn.0040a054
xor eax, eax
cmp dword [ebp - 4], eax
pop ecx
jne 0x412af9
mov eax, dword [ebp + 8]
mov dword [esi], eax
jmp 0x412b47
mov ecx, dword [esi + 4]
mov dword [esi], ecx
inc edi
add esi, 4
cmp dword [esi], eax
jne 0x412af0
mov eax, edi
shl eax, 2
push eax
push ebx
call fcn.0040c8fd
test eax, eax
pop ecx
pop ecx
je 0x412b47
jmp 0x412b42
cmp dword [ebp - 4], 0
jne 0x412bb5
test edi, edi
jge 0x412b21
neg edi
lea eax, [edi*4 + 8]
push eax
push ebx
call fcn.0040c8fd
test eax, eax
pop ecx
pop ecx
je 0x412a79
lea ecx, [eax + edi*4]
and dword [ecx + 4], 0
mov dword [ecx], esi
mov dword [0x41b3d4], eax
cmp dword [ebp + 0xc], 0
je 0x412b9e
push dword [ebp + 8]
call fcn.0040dde0
inc eax
inc eax
push eax
call fcn.0040b553
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x412b9e
push dword [ebp + 8]
push esi
call fcn.00411430
mov eax, esi
sub eax, dword [ebp + 8]
pop ecx
add eax, dword [ebp - 0xc]
pop ecx
and byte [eax], 0
mov ecx, dword [ebp - 4]
inc eax
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x412b97
or dword [ebp - 8], 0xffffffff
push esi
call fcn.0040a054
pop ecx
cmp dword [ebp - 4], 0
je 0x412bad
push dword [ebp + 8]
call fcn.0040a054
pop ecx
mov eax, dword [ebp - 8]
jmp 0x412a7c
push esi
call fcn.0040a054
pop ecx
xor eax, eax
jmp 0x412a7c
Function at 0x412d1a
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x41b720], ebx
push esi
push edi
jne 0x412d9a
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x412dd5
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x41b720], eax
je 0x412dd5
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x41b724], eax
call esi
cmp dword [0x41b3b4], 2
mov dword [0x41b728], eax
jne 0x412d9a
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x41b730], eax
je 0x412d9a
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x41b72c], eax
mov eax, dword [0x41b72c]
test eax, eax
je 0x412ddf
call eax
test eax, eax
je 0x412dc6
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x41b730]
test eax, eax
je 0x412dc6
test byte [ebp - 8], 1
jne 0x412ddf
cmp dword [0x41b3c0], 4
jb 0x412dd9
or byte [ebp + 0x12], 0x20
jmp 0x412dfe
xor eax, eax
jmp 0x412e0e
or byte [ebp + 0x12], 4
jmp 0x412dfe
mov eax, dword [0x41b724]
test eax, eax
je 0x412dfe
call eax
mov ebx, eax
test ebx, ebx
je 0x412dfe
mov eax, dword [0x41b728]
test eax, eax
je 0x412dfe
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x41b720]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x41315a
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.00409ad0
mov eax, dword [0x41aa18]
xor eax, dword [ebp + 4]
push ebx
push esi
push 1
xor esi, esi
push esi
push dword [ebp + 8]
mov dword [ebp - 4], eax
call fcn.00410e71
or ebx, 0xffffffff
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x413284
push 2
push esi
push dword [ebp + 8]
call fcn.00410e71
add esp, 0xc
cmp eax, ebx
je 0x413284
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x413227
mov ebx, 0x1000
push ebx
lea eax, [ebp - 0x100c]
push esi
push eax
call fcn.0040dfb0
push 0x8000
push dword [ebp + 8]
call fcn.00413aa8
add esp, 0x14
mov dword [ebp - 0xc], eax
cmp edi, ebx
mov eax, ebx
jge 0x4131e0
mov eax, edi
push eax
lea eax, [ebp - 0x100c]
push eax
push dword [ebp + 8]
call fcn.0040d199
add esp, 0xc
cmp eax, 0xffffffff
je 0x413200
sub edi, eax
test edi, edi
jg 0x4131d8
jmp 0x413218
call fcn.00409f1d
cmp dword [eax], 5
jne 0x413215
call fcn.00409f14
mov dword [eax], 0xd
or esi, 0xffffffff
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.00413aa8
pop ecx
pop ecx
jmp 0x41326f
jge 0x41326f
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00410e71
push dword [ebp + 8]
call fcn.00410c0a
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, ebx
jne 0x41326f
call fcn.00409f14
mov dword [eax], 0xd
call fcn.00409f1d
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
push 0
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.00410e71
add esp, 0xc
mov eax, esi
pop edi
jmp 0x413286
mov eax, ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop esi
pop ebx
call fcn.004105af
leave
ret