joyce8/EMBER2024-capa huggingface dataset:
Function at 0x5ba410
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 8]
sub esp, 4
push ebx
push esi
mov esi, dword [esp + 0x10]
push edi
push ebp
push 2
push eax
push esi
call dword [sym.imp.kernel32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x5ba43b
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push edi
push esi
call dword [sym.imp.kernel32.dll_SizeofResource]
mov ebx, eax
push edi
push esi
call dword [sym.imp.kernel32.dll_LoadResource]
mov esi, eax
test esi, esi
jne 0x5ba45f
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push ebx
push 0x40
call dword [sym.imp.kernel32.dll_GlobalAlloc]
mov ebp, eax
test ebp, ebp
jne 0x5ba47a
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
mov edi, ebp
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x20]
xor ecx, ecx
mov cl, ah
mov edx, eax
mov dword [esp + 0x10], 0
shl ecx, 8
shr edx, 0x10
mov byte [esp + 0x10], dl
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x28]
or ecx, edx
mov edx, eax
shr edx, 0x10
mov dword [ebp + 0x28], ecx
mov dword [esp + 0x10], 0
xor ecx, ecx
mov byte [esp + 0x10], dl
mov cl, ah
xor edx, edx
shl ecx, 8
mov dl, al
shl edx, 0x10
or ecx, dword [esp + 0x10]
or ecx, edx
mov eax, dword [esp + 0x24]
mov edx, eax
mov dword [ebp + 0x44], ecx
shr edx, 0x10
xor ecx, ecx
mov dword [esp + 0x10], 0
mov cl, ah
mov byte [esp + 0x10], dl
shl ecx, 8
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x2c]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x48], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x30]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x64], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x34]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x54], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
push 0
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
or ecx, edx
mov dword [ebp + 0x50], ecx
call dword [sym.imp.user32.dll_GetDC]
mov edi, eax
push 0
push ebp
lea ecx, [ebp + 0x68]
push ecx
push 4
push ebp
push edi
call dword [sym.imp.gdi32.dll_CreateDIBitmap]
mov esi, eax
push edi
push 0
call dword [sym.imp.user32.dll_ReleaseDC]
push ebp
call dword [sym.imp.kernel32.dll_GlobalFree]
mov eax, esi
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20

Function at 0x5becb0
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x5bece8
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.005bd1e4
push eax
push dword [esi + 0x1c]
call dword [sym.imp.user32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.005bd1bc
jmp 0x5becf4
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4
Function at 0x5c050a
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 0x5c054c
call fcn.005c93be
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.kernel32.dll_FindResourceA]
cmp eax, edi
je 0x5c054c
push eax
push esi
call dword [sym.imp.kernel32.dll_LoadResource]
cmp eax, edi
jne 0x5c0543
xor eax, eax
jmp 0x5c0554
push eax
call dword [sym.imp.kernel32.dll_LockResource_1]
mov edi, eax
push edi
mov ecx, ebx
call fcn.005c055a
pop edi
pop esi
pop ebx
ret 4

Function at 0x5c1165
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push esi
mov eax, ebx
push edi
mov edi, ecx
shr eax, 0x10
test ax, ax
mov dword [edi + 0x40], ebx
jne 0x5c1187
cmp dword [edi + 0x3c], 0
jne 0x5c1187
movzx eax, bx
mov dword [edi + 0x3c], eax
call fcn.005c93be
mov esi, dword [eax + 0xc]
push 5
push ebx
push esi
call dword [sym.imp.kernel32.dll_FindResourceA]
push eax
push esi
call dword [sym.imp.kernel32.dll_LoadResource]
push esi
mov ecx, edi
push dword [esp + 0x18]
push eax
call fcn.005c11b4
pop edi
pop esi
pop ebx
ret 8
Function at 0x5c226a
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push edi
push dword [ebp + 8]
xor edi, edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 8], edi
call dword [sym.imp.kernel32.dll_GetFileAttributesA]
mov ebx, dword [sym.imp.kernel32.dll_GetLastError]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x5c229a
push edi
call ebx
push eax
call fcn.005bd399
push esi
mov esi, dword [ebp + 0xc]
movzx eax, byte [esi + 0x10]
cmp eax, dword [ebp - 4]
je 0x5c22c4
test byte [ebp - 4], 1
je 0x5c22c4
push eax
push dword [ebp + 8]
call dword [sym.imp.kernel32.dll_SetFileAttributesA]
test eax, eax
jne 0x5c22c4
push edi
call ebx
push eax
call fcn.005bd399
cmp dword [esi + 4], edi
lea eax, [esi + 4]
je 0x5c236a
lea ecx, [ebp - 0x24]
push ecx
push eax
call fcn.005c21b7
cmp dword [esi + 8], edi
lea eax, [esi + 8]
pop ecx
pop ecx
je 0x5c22f6
lea ecx, [ebp - 0x14]
push ecx
push eax
call fcn.005c21b7
pop ecx
lea eax, [ebp - 0x14]
pop ecx
mov dword [ebp - 8], eax
cmp dword [esi], edi
je 0x5c230c
lea eax, [ebp - 0x1c]
push eax
push esi
call fcn.005c21b7
pop ecx
lea eax, [ebp - 0x1c]
pop ecx
mov dword [ebp - 0xc], eax
push edi
push pe_nt_image_headers32
push 3
push edi
push 1
push 0xc0000000
push dword [ebp + 8]
call dword [sym.imp.kernel32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x5c2336
push 0
call ebx
push eax
call fcn.005bd399
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 8]
push dword [ebp - 0xc]
push edi
call dword [sym.imp.kernel32.dll_SetFileTime]
test eax, eax
jne 0x5c2354
push eax
call ebx
push eax
call fcn.005bd399
push edi
call dword [sym.imp.kernel32.dll_CloseHandle]
test eax, eax
jne 0x5c2368
push eax
call ebx
push eax
call fcn.005bd399
xor edi, edi
movzx eax, byte [esi + 0x10]
cmp eax, dword [ebp - 4]
pop esi
je 0x5c2391
test byte [ebp - 4], 1
jne 0x5c2391
push eax
push dword [ebp + 8]
call dword [sym.imp.kernel32.dll_SetFileAttributesA]
test eax, eax
jne 0x5c2391
push edi
call ebx
push eax
call fcn.005bd399
pop edi
pop ebx
leave
ret 8

Function at 0x5cc9a0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push dword [esp + 0xc]
push dword [esp + 0xc]
push dword [esp + 0xc]
push dword [ecx + 4]
call sub.wsock32.dll_recv
ret 0xc

Function at 0x5cc9b7
Capabilities:
Send data
Send data on socket

Disassembly:
push dword [esp + 0xc]
push dword [esp + 0xc]
push dword [esp + 0xc]
push dword [ecx + 4]
call sub.wsock32.dll_send
ret 0xc
Function at 0x4010c0
Capabilities:
Create process on windows
Create process suspended

Disassembly:
sub esp, 0x58
push ebx
mov ebx, dword [esp + 0x60]
push esi
push edi
lea eax, [esp + 0xc]
push 0
push eax
mov esi, ecx
push ebx
mov dword [esp + 0x18], 0
call fcn.00401993
mov ecx, dword [esp + 0x18]
mov edi, eax
add esp, 0xc
cmp byte [ecx], 0
jne 0x401122
push edi
mov dword [esi + 4], 1
call dword [sym.imp.KERNEL32.dll_DebugActiveProcess]
mov esi, eax
test esi, esi
jne 0x401170
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push 0x10
push 1
call fcn.004016f0
add esp, 0x10
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x58
ret 4
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x20]
lea edx, [esp + 0x10]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x20]
push edx
push eax
push 0
push 0
push 2
push 0
push 0
push 0
push ebx
push 0
mov dword [esp + 0x48], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov esi, eax
test esi, esi
jne 0x401170
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push 0x10
push 2
call fcn.004016f0
add esp, 0x10
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x58
ret 4

Function at 0x4014f0
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x406130
push 0x401aa4
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
xor esi, esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 4], esi
lea eax, [ebp - 0x30]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x401582
xor ecx, ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], ecx
mov edi, 1
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x20], 2
lea edx, [ebp - 0x28]
push edx
push str.SeDebugPrivilege
push esi
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x401582
push esi
push esi
push esi
lea eax, [ebp - 0x2c]
push eax
push esi
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x401582
mov dword [ebp - 0x1c], edi
mov dword [ebp - 4], 0xffffffff
call 0x401590
xor esi, esi
mov eax, dword [ebp - 0x30]
cmp eax, esi
je 0x40159e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esp, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x401620
Capabilities:
Create thread

Disassembly:
push ecx
push esi
push 0
push 0
push 0
mov esi, ecx
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [esi + 8], eax
cmp eax, 0xffffffff
pop esi
je 0x40165e
lea ecx, [esp]
push ecx
push 0
push eax
push 0x4015c0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, 0xffffffff
je 0x40165e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ecx
ret
Function at 0x4029cc
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x407370
cmp edx, dword [eax]
je 0x4029ee
add eax, 8
inc ecx
cmp eax, 0x407400
jl 0x4029df
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x407370]
jne 0x402b1c
mov eax, dword [0x407848]
cmp eax, 1
je 0x402af6
test eax, eax
jne 0x402a1f
cmp dword [0x4070bc], 1
je 0x402af6
cmp edx, 0xfc
je 0x402b1c
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x402a56
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.00404180
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00404270
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x402a99
lea eax, [ebp - 0x1a4]
push eax
call fcn.00404270
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x406420
push edi
call fcn.00404380
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.00404180
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00404190
lea eax, [ebp - 0xa0]
push 0x406400
push eax
call fcn.00404190
push dword [esi + 0x407374]
lea eax, [ebp - 0xa0]
push eax
call fcn.00404190
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.004042eb
add esp, 0x2c
pop edi
jmp 0x402b1c
lea eax, [ebp + 8]
lea esi, [esi + 0x407374]
push 0
push eax
push dword [esi]
call fcn.00404270
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]
pop esi
leave
ret
Function at 0x404529
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
push esi
push str.FlsAlloc
push 0x40e2d0
push str.FlsAlloc
push 0
call fcn.004044a2
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40455b
push dword [ebp + 8]
mov ecx, esi
call fcn.0040354f
call esi
pop esi
pop ebp
ret
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsAlloc]

Function at 0x40459d
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
push str.FlsSetValue
push 0x40e300
push str.FlsSetValue
push 3
call fcn.004044a2
add esp, 0x10
mov esi, eax
push dword [ebp + 0xc]
push dword [ebp + 8]
test esi, esi
je 0x4045d1
mov ecx, esi
call fcn.0040354f
call esi
jmp 0x4045d7
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop esi
pop ebp
ret
Function at 0x405590
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket

Disassembly:
sub esp, 0x10
push esi
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4055ae
or eax, eax
pop esi
add esp, 0x10
ret
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
push ecx
mov dword [esp + 0xc], eax
mov word [esp + 8], 2
call dword [sym.imp.WS2_32.dll_htons]
lea edx, [esp + 4]
push 0x10
push edx
push esi
mov word [esp + 0x12], ax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4055ef
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
pop esi
add esp, 0x10
ret
mov eax, esi
pop esi
add esp, 0x10
ret

Function at 0x430000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
nop
mov eax, section..text
nop
mov ebx, 0x408f6c
mov ecx, 0x93a00cd
nop
nop
nop
test eax, eax
nop
nop
je 0x43004e
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
nop
jne 0x430024
mov eax, section..text_1
nop
nop
mov ebx, 0x42e3d0
mov ecx, 0x6da304aa
nop
nop
nop
test eax, eax
nop
nop
nop
nop
nop
je 0x430084
nop
nop
nop
nop
xor dword [eax], ecx
nop
add eax, 4
nop
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
jne 0x43006c
nop
nop
nop
nop
nop
popal
jmp 0x401219
Function at 0x10004360
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x10
mov esi, dword [ebp + 8]
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_strlen]
mov ebx, eax
xor eax, eax
test ebx, ebx
je 0x100043b8
cmp byte [esi + ebx - 1], 0xa
je 0x1000438c
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x24]
xchg dword [0x10005194], eax
mov dword [esp], 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_fwrite]
add esp, 0x10
pop ebx
pop esi
pop ebp
ret

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x4068fb
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
push esi
mov esi, 0x104
lea eax, [ebp - 0x23c]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp eax, esi
pop esi
jbe 0x40691f
xor eax, eax
test eax, eax
je 0x406932
cmp word [ebp + eax*2 - 0x23e], 0x5c
je 0x406932
xor ecx, ecx
jmp 0x406935
xor ecx, ecx
inc ecx
push dword [ebp + 8]
lea ecx, [ecx*2 + 0x40a014]
lea eax, [ebp + eax*2 - 0x23c]
push ecx
push str._s_S.dll
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x23c]
push 8
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
leave
ret 4

Function at 0x406a58
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x43110c], 0
push esi
jne 0x406a8f
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x406a69
mov dword [ecx*4 + 0x431108], eax
inc ecx
cmp ecx, 0x100
jl 0x406a64
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x406ac0
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x431108]
xor eax, esi
inc ecx
dec edx
jne 0x406aa2
pop edi
not eax
pop esi
ret 0xc

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x401000
Capabilities:
Enumerate services
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x410280
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x415040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, ecx
mov dword [ebp - 0x50], eax
push 0x2c
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
mov dword [ebp - 0x4c], ebx
test ebx, ebx
je 0x4011e5
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x34]
push eax
push 0
push 0
push 1
mov dword [ebp - 4], 0
mov esi, dword [sym.imp.ADVAPI32.dll_EnumDependentServicesW]
push ebx
call esi
test eax, eax
jne 0x401117
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
je 0x401092
push 0x4140a8
lea eax, [ebp - 0x48]
push eax
mov dword [ebp - 0x48], 0
call fcn.0040ef0a
push dword [ebp - 0x34]
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x34]
push edi
push 1
push ebx
call esi
test eax, eax
jne 0x4010d0
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0x4140a8
lea eax, [ebp - 0x54]
push eax
mov dword [ebp - 0x54], 0
call fcn.0040ef0a
xor esi, esi
cmp esi, dword [ebp - 0x38]
jae 0x401110
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x50]
inc eax
lea edx, [esi + esi*8]
push eax
mov edx, dword [edi + edx*4]
call section..text
add esp, 4
test eax, eax
jne 0x40110d
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0x4140a8
lea eax, [ebp - 0x3c]
push eax
mov dword [ebp - 0x3c], 0
call fcn.0040ef0a
inc esi
jmp 0x4010d2
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea eax, [ebp - 0x30]
push eax
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x40115e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x4140a8
cmp eax, 0x426
je 0x40114a
lea eax, [ebp - 0x58]
push eax
mov dword [ebp - 0x58], 0
call fcn.0040ef0a
xor eax, eax
cmp dword [ebp + 8], eax
setg al
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x40]
push eax
call fcn.0040ef0a
xor edi, edi
xor esi, esi
lea eax, [ebp - 0x30]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov eax, dword [ebp - 0x2c]
cmp eax, 1
je 0x4011d9
test edi, edi
jne 0x401183
cmp eax, 3
jne 0x401183
lea edi, [eax - 2]
jmp 0x401188
cmp eax, 4
je 0x40119c
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp esi, 0x78
jb 0x401162
mov eax, dword [ebp - 0x2c]
cmp eax, 1
je 0x4011d9
push 0x4140a8
lea eax, [ebp - 0x44]
push eax
mov dword [ebp - 0x44], 0
call fcn.0040ef0a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x4c]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, 0x4011d4
ret
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004037fe
mov esp, ebp
pop ebp
ret
Function at 0x401210
Capabilities:
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x415040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push 0
mov ebx, ecx
push 0
push ebx
mov dword [ebp - 0x1c], 1
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x401248
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004037fe
mov esp, ebp
pop ebp
ret
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
xor esi, esi
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x401289
mov eax, dword [ebp - 0x1c]
cmp eax, 2
jne 0x401279
push 0x1f4
call edi
inc esi
cmp esi, 0x1e
jl 0x401252
mov eax, dword [ebp - 0x1c]
cmp eax, 4
je 0x40129c
push 0x426
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004037fe
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.004037fe
mov esp, ebp
pop ebp
ret

Function at 0x4012f0
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
push edi
push 0
push dword [ebp + 8]
mov esi, ecx
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov edi, eax
test edi, edi
je 0x4013a4
cmp edi, dword [esi + 8]
ja 0x40131b
cmp edi, dword [esi + 4]
jbe 0x40132c
jmp 0x401327
push edi
mov ecx, esi
call fcn.00401d40
test al, al
je 0x40139c
call fcn.00401de0
mov dword [esi + 4], edi
push dword [esi]
push edi
push 0
push dword [ebp + 8]
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
je 0x4013a4
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
push str.VarFileInfoTranslation
push dword [esi]
call dword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
je 0x4013a4
cmp dword [ebp - 4], 4
jae 0x401372
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 8]
movzx eax, word [ecx + 2]
push eax
movzx eax, word [ecx]
push eax
lea eax, [esi + 0x10]
push str.StringFileInfo_04X_04X_
push eax
call fcn.00401ca0
add esp, 0x10
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 4

Function at 0x401f10
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
mov edi, edx
mov ebx, ecx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x401f29
pop edi
pop ebx
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x401f64
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 8]
lea edx, [esi + eax]
and ecx, 0xf
jbe 0x401f60
lea ebx, [ebx]
cmp esi, edx
jae 0x401f64
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
dec ecx
jne 0x401f50
cmp esi, edx
jb 0x401f6b
pop esi
pop edi
xor eax, eax
pop ebx
pop ebp
ret
xor eax, eax
cmp word [esi], ax
cmove esi, eax
mov eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret