joyce8/EMBER2024-capa huggingface dataset:
Function at 0x5ec4e0
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
push esi
mov dword [ebp - 0x114], ecx
mov eax, dword [ebp - 0x114]
mov dword [eax + 0x18], 0
mov ecx, dword [ebp - 0x114]
mov edx, dword [ebp + 0xc]
mov dword [ecx + 0x1c], edx
mov eax, dword [ebp + 0xc]
sub eax, 4
mov ecx, dword [ebp - 0x114]
mov dword [ecx + 0x20], eax
push 0x6c74b8
call fcn.005eb4f0
add esp, 4
push eax
push 0x1388
push 0
push 0
call dword [sym.imp.kernel32.dll_CreateSemaphoreA]
mov edx, dword [ebp - 0x114]
mov dword [edx + 0x24], eax
push 0x6c74c8
call fcn.005eb4f0
add esp, 4
push eax
push 0x1388
push 0
push 0
call dword [sym.imp.kernel32.dll_CreateSemaphoreA]
mov ecx, dword [ebp - 0x114]
mov dword [ecx + 0x28], eax
mov dword [ebp - 0x108], 0
jmp 0x5ec57f
mov edx, dword [ebp - 0x108]
add edx, 1
mov dword [ebp - 0x108], edx
cmp dword [ebp - 0x108], 4
jge 0x5ec5d3
mov eax, dword [ebp - 0x108]
push eax
mov ecx, dword [ebp + 8]
push ecx
push 0x6c74e0
call fcn.005eb4f0
add esp, 4
push eax
lea edx, [ebp - 0x100]
push edx
call fcn.006374e0
add esp, 0x10
lea eax, [ebp - 0x100]
push eax
push 0
push 0
call dword [sym.imp.kernel32.dll_CreateMutexA]
mov ecx, dword [ebp - 0x108]
mov edx, dword [ebp - 0x114]
mov dword [edx + ecx*4 + 8], eax
jmp 0x5ec570
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push 0
push 0x8000004
push 0
push 0xffffffffffffffff
call dword [sym.imp.kernel32.dll_CreateFileMappingA]
mov edx, dword [ebp - 0x114]
mov dword [edx + 4], eax
call dword [sym.imp.kernel32.dll_GetLastError]
mov dword [ebp - 0x104], eax
push 0
push 0
push 0
push 0xf001f
mov eax, dword [ebp - 0x114]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.kernel32.dll_MapViewOfFile]
mov edx, dword [ebp - 0x114]
mov dword [edx + 0x18], eax
cmp dword [ebp - 0x104], 0xb7
je 0x5ec668
push 8
mov ecx, dword [ebp - 0x114]
call fcn.005ec4a0
mov dword [ebp - 0x110], 0
mov dword [ebp - 0x10c], 0
push 8
lea eax, [ebp - 0x110]
push eax
push 0
mov ecx, dword [ebp - 0x114]
call fcn.005ec750
mov ecx, dword [ebp - 0x114]
mov esi, dword [ecx + 0x1c]
sub esi, 4
mov ecx, dword [ebp - 0x114]
call fcn.005ec4c0
sub esi, eax
mov edx, dword [ebp - 0x114]
mov dword [edx + 0x20], esi
pop esi
mov esp, ebp
pop ebp
ret 8

Function at 0x5ecd60
Capabilities:
Hash data with md5

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov dword [eax], 0x67452301
mov ecx, dword [ebp + 8]
mov dword [ecx + 4], 0xefcdab89
mov edx, dword [ebp + 8]
mov dword [edx + 8], 0x98badcfe
mov eax, dword [ebp + 8]
mov dword [eax + 0xc], 0x10325476
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x10], 0
mov edx, dword [ebp + 8]
mov dword [edx + 0x14], 0
pop ebp
ret
Function at 0x5f1040
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
mov dword [ebp - 4], 0
push 0x140
push 0
lea eax, [ebp - 0x148]
push eax
call fcn.00637390
add esp, 0xc
lea ecx, [ebp - 0x148]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.kernel32.dll_FindFirstFileA]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x5f1084
xor eax, eax
jmp 0x5f10f8
cmp dword [ebp + 0x10], 0xffffffff
je 0x5f10b2
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0x10]
jne 0x5f10b2
cmp dword [ebp + 0xc], 0
je 0x5f10b2
lea ecx, [ebp - 0x11c]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.006373f0
add esp, 8
mov eax, 1
jmp 0x5f10f8
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
lea ecx, [ebp - 0x148]
push ecx
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.kernel32.dll_FindNextFileA]
cmp eax, 1
je 0x5f1084
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.kernel32.dll_FindClose]
cmp dword [ebp + 0x14], 0
je 0x5f10e9
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 4]
mov dword [ecx], edx
cmp dword [ebp + 0x10], 0xffffffff
jne 0x5f10f6
mov eax, 1
jmp 0x5f10f8
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x5f11e0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
mov byte [ebp - 4], 1
mov eax, dword [ebp + 0x10]
and eax, 0xff
test eax, eax
je 0x5f1265
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.kernel32.dll_GetWindowsDirectoryA]
test eax, eax
jbe 0x5f125f
mov eax, dword [ebp + 8]
push eax
call fcn.00637540
add esp, 4
mov ecx, dword [ebp + 8]
movsx edx, byte [ecx + eax - 1]
cmp edx, 0x5c
jne 0x5f1233
mov eax, dword [ebp + 8]
push eax
call fcn.00637540
add esp, 4
mov ecx, dword [ebp + 8]
mov byte [ecx + eax - 1], 0
cmp dword [ebp + 0x14], 0
je 0x5f124c
push 0x6fb218
mov edx, dword [ebp + 8]
push edx
call fcn.00637400
add esp, 8
jmp 0x5f125d
push 0x6fb22c
mov eax, dword [ebp + 8]
push eax
call fcn.00637400
add esp, 8
jmp 0x5f1263
mov byte [ebp - 4], 0
jmp 0x5f12aa
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.kernel32.dll_GetTempPathA]
test eax, eax
jbe 0x5f12a6
mov eax, dword [ebp + 8]
push eax
call fcn.00637540
add esp, 4
mov ecx, dword [ebp + 8]
movsx edx, byte [ecx + eax - 1]
cmp edx, 0x5c
jne 0x5f12a4
mov eax, dword [ebp + 8]
push eax
call fcn.00637540
add esp, 4
mov ecx, dword [ebp + 8]
mov byte [ecx + eax - 1], 0
jmp 0x5f12aa
mov byte [ebp - 4], 0
mov al, byte [ebp - 4]
mov esp, ebp
pop ebp
ret
Function at 0x5f1470
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x248
push 0x100
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.kernel32.dll_GetSystemDirectoryA]
push 0x6fb280
lea ecx, [ebp - 0x104]
push ecx
call fcn.00637400
add esp, 8
push 0x140
push 0
lea edx, [ebp - 0x244]
push edx
call fcn.00637390
add esp, 0xc
lea eax, [ebp - 0x244]
push eax
lea ecx, [ebp - 0x104]
push ecx
call dword [sym.imp.kernel32.dll_FindFirstFileA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x5f14d9
xor al, al
jmp 0x5f1585
call dword [sym.imp.kernel32.dll_GetTickCount]
push eax
call fcn.00637a24
add esp, 4
lea edx, [ebp - 0x240]
push edx
call fcn.005f1390
add esp, 4
lea eax, [ebp - 0x238]
push eax
call fcn.005f1390
add esp, 4
mov ecx, dword [ebp - 0x240]
mov dword [ebp - 0x230], ecx
mov edx, dword [ebp - 0x23c]
mov dword [ebp - 0x22c], edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.kernel32.dll_FindClose]
push 0
push 0
push 3
push 0
push 0
push 0x10000000
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.kernel32.dll_CreateFileA]
mov dword [ebp - 0x248], eax
cmp dword [ebp - 0x248], 0xffffffff
jne 0x5f1554
xor al, al
jmp 0x5f1585
lea edx, [ebp - 0x230]
push edx
lea eax, [ebp - 0x238]
push eax
lea ecx, [ebp - 0x240]
push ecx
mov edx, dword [ebp - 0x248]
push edx
call dword [sym.imp.kernel32.dll_SetFileTime]
mov eax, dword [ebp - 0x248]
push eax
call dword [sym.imp.kernel32.dll_CloseHandle]
mov al, 1
mov esp, ebp
pop ebp
ret

Function at 0x5f1590
Capabilities:
Persist via run registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov byte [ebp - 4], 0
mov dword [ebp - 8], 0
lea eax, [ebp - 8]
push eax
push 0x6fb290
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.advapi32.dll_RegOpenKeyA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 8], 0
je 0x5f15fa
mov edx, dword [ebp + 0x10]
push edx
call fcn.00637540
add esp, 4
add eax, 1
push eax
mov eax, dword [ebp + 0x10]
push eax
push 1
push 0
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.advapi32.dll_RegSetValueExA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x5f15f0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov al, byte [ebp - 4]
mov esp, ebp
pop ebp
ret
Function at 0x5f1610
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x642ef8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xb28
cmp dword [ebp + 8], 0
jne 0x5f163b
xor al, al
jmp 0x5f17bf
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x21c]
call fcn.005f2d10
mov dword [ebp - 4], 0
mov ecx, dword [0x6fb2c0]
mov dword [ebp - 0x14], ecx
mov dx, word [0x6fb2c4]
mov word [ebp - 0x10], dx
mov al, byte [0x6fb2c6]
mov byte [ebp - 0xe], al
lea ecx, [ebp - 0x620]
push ecx
lea edx, [ebp - 0x14]
push edx
call fcn.005f1100
add esp, 8
test eax, eax
jne 0x5f1698
push 0x100
lea eax, [ebp - 0x520]
push eax
call dword [sym.imp.kernel32.dll_GetWindowsDirectoryA]
jmp 0x5f16b3
lea ecx, [ebp - 0x620]
push ecx
push 0x6fb2c8
lea edx, [ebp - 0x520]
push edx
call fcn.006374e0
add esp, 0xc
push 1
push 0
push 0x100
lea eax, [ebp - 0x320]
push eax
call fcn.005f3a30
add esp, 0x10
mov dword [ebp - 0x220], eax
cmp dword [ebp - 0x220], 0
je 0x5f16fe
mov byte [ebp - 0x624], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x21c]
call fcn.005f2d50
mov al, byte [ebp - 0x624]
jmp 0x5f17bf
lea ecx, [ebp - 0x320]
push ecx
lea edx, [ebp - 0x520]
push edx
push 0x6fb2d0
lea eax, [ebp - 0xb28]
push eax
call fcn.005e5120
add esp, 0x10
mov dword [ebp - 0xb30], eax
mov ecx, dword [ebp - 0xb30]
mov dword [ebp - 0xb34], ecx
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0xb34]
call fcn.005e5160
push eax
lea edx, [ebp - 0x420]
push edx
call fcn.006373f0
add esp, 8
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xb28]
call fcn.005e5170
lea eax, [ebp - 0x420]
push eax
lea ecx, [ebp - 0x21c]
call fcn.005f2ac0
test eax, eax
je 0x5f17a0
lea ecx, [ebp - 0x420]
push ecx
call fcn.005f1470
add esp, 4
lea edx, [ebp - 0x420]
push edx
lea eax, [ebp - 0x320]
push eax
push 0x80000002
call fcn.005f1590
add esp, 0xc
mov byte [ebp - 0xb2c], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x21c]
call fcn.005f2d50
mov al, byte [ebp - 0xb2c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
Function at 0x5f17d0
Capabilities:
Delete registry value
Persist via run registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov dword [ebp - 4], 0
lea eax, [ebp - 4]
push eax
push 0x6fb2e0
push 0x80000002
call dword [sym.imp.advapi32.dll_RegOpenKeyA]
cmp dword [ebp - 4], 0
je 0x5f18ad
mov dword [ebp - 8], 0
mov ecx, 1
test ecx, ecx
je 0x5f18a3
mov dword [ebp - 0x214], 0x100
mov dword [ebp - 0xc], 0x100
push 0x100
push 0
lea edx, [ebp - 0x210]
push edx
call fcn.00637390
add esp, 0xc
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp - 0x210]
push ecx
push 0
push 0
lea edx, [ebp - 0x214]
push edx
lea eax, [ebp - 0x110]
push eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.advapi32.dll_RegEnumValueA]
test eax, eax
je 0x5f186a
jmp 0x5f18a3
push 0
lea eax, [ebp - 0x110]
push eax
call fcn.005f38f0
add esp, 8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x5f1895
lea ecx, [ebp - 0x110]
push ecx
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.advapi32.dll_RegDeleteValueA]
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
jmp 0x5f1805
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.advapi32.dll_RegCloseKey]
xor al, al
mov esp, ebp
pop ebp
ret

Function at 0x5f18c0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x204
push 0x100
lea eax, [ebp - 0x100]
push eax
call dword [sym.imp.kernel32.dll_GetWindowsDirectoryA]
test eax, eax
jbe 0x5f19b6
lea ecx, [ebp - 0x100]
push ecx
call fcn.00637540
add esp, 4
movsx edx, byte [ebp + eax - 0x101]
cmp edx, 0x5c
jne 0x5f1916
lea eax, [ebp - 0x100]
push eax
call fcn.00637540
add esp, 4
mov byte [ebp + eax - 0x101], 0
cmp dword [ebp + 0xc], 0
je 0x5f1932
push 0x6fb310
lea ecx, [ebp - 0x100]
push ecx
call fcn.00637400
add esp, 8
jmp 0x5f1946
push 0x6fb324
lea edx, [ebp - 0x100]
push edx
call fcn.00637400
add esp, 8
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x204]
push ecx
call fcn.006373f0
add esp, 8
push 0x5c
lea edx, [ebp - 0x204]
push edx
call fcn.00638a50
add esp, 8
mov dword [ebp - 0x104], eax
cmp dword [ebp - 0x104], 0
je 0x5f1982
mov eax, dword [ebp - 0x104]
mov byte [eax], 0
lea ecx, [ebp - 0x100]
push ecx
call fcn.00642a1d
add esp, 4
push eax
lea edx, [ebp - 0x204]
push edx
call fcn.00642a1d
add esp, 4
push eax
call fcn.00638270
add esp, 8
test eax, eax
je 0x5f19b2
mov al, 1
jmp 0x5f19b8
xor al, al
jmp 0x5f19b8
xor al, al
mov esp, ebp
pop ebp
ret
Function at 0x5f2ac0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x204]
mov dword [ebp - 4], ecx
cmp dword [ebp - 4], 0
je 0x5f2b30
push 0
push 0
push 2
push 0
push 0
push 0x40000000
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.kernel32.dll_CreateFileA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
jne 0x5f2b01
xor eax, eax
jmp 0x5f2b32
push 0
lea eax, [ebp - 8]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 8]
push edx
mov eax, dword [ebp - 4]
add eax, 0xc
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.kernel32.dll_WriteFile]
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, 1
jmp 0x5f2b32
xor eax, eax
mov esp, ebp
pop ebp
ret 4

Function at 0x5f2b40
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x204
mov dword [ebp - 0x204], ecx
push 0xff
lea eax, [ebp - 0x100]
push eax
call dword [sym.imp.kernel32.dll_GetSystemDirectoryA]
mov ecx, dword [ebp - 0x204]
add ecx, 4
push ecx
lea edx, [ebp - 0x100]
push edx
push 0x6fb91c
lea eax, [ebp - 0x200]
push eax
call fcn.006374e0
add esp, 0x10
lea ecx, [ebp - 0x200]
push ecx
mov edx, dword [ebp - 0x204]
add edx, 0x103
push edx
call fcn.006373f0
add esp, 8
lea eax, [ebp - 0x200]
push eax
mov ecx, dword [ebp - 0x204]
call fcn.005f2ac0
test eax, eax
je 0x5f2bc5
mov eax, dword [ebp - 0x204]
add eax, 0x103
jmp 0x5f2bd0
mov eax, dword [ebp - 0x204]
add eax, 0x103
mov esp, ebp
pop ebp
ret

Function at 0x5f2be0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x204
mov dword [ebp - 0x204], ecx
lea eax, [ebp - 0x100]
push eax
push 0xff
call dword [sym.imp.kernel32.dll_GetTempPathA]
mov ecx, dword [ebp - 0x204]
add ecx, 4
push ecx
lea edx, [ebp - 0x100]
push edx
push 0x6fb924
lea eax, [ebp - 0x200]
push eax
call fcn.006374e0
add esp, 0x10
lea ecx, [ebp - 0x200]
push ecx
mov edx, dword [ebp - 0x204]
add edx, 0x103
push edx
call fcn.006373f0
add esp, 8
lea eax, [ebp - 0x200]
push eax
mov ecx, dword [ebp - 0x204]
call fcn.005f2ac0
test eax, eax
je 0x5f2c65
mov eax, dword [ebp - 0x204]
add eax, 0x103
jmp 0x5f2c70
mov eax, dword [ebp - 0x204]
add eax, 0x103
mov esp, ebp
pop ebp
ret

Function at 0x5f3480
Capabilities:
Get common file path
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x200
cmp dword [ebp + 8], 0
jne 0x5f3496
mov eax, 4
jmp 0x5f350d
push 0x100
push 0
lea eax, [ebp - 0x200]
push eax
call fcn.00637390
add esp, 0xc
push 0x100
push 0
lea ecx, [ebp - 0x100]
push ecx
call fcn.00637390
add esp, 0xc
push 0x100
lea edx, [ebp - 0x100]
push edx
call dword [sym.imp.kernel32.dll_GetSystemDirectoryA]
mov byte [ebp - 0xfd], 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp + 8]
push eax
push 0x100
lea ecx, [ebp - 0x200]
push ecx
lea edx, [ebp - 0x100]
push edx
call dword [sym.imp.kernel32.dll_GetVolumeInformationA]
test eax, eax
jne 0x5f350b
mov eax, 3
jmp 0x5f350d
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x5f4000
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push 0x6fbc34
call dword [sym.imp.kernel32.dll_CreateFileA]
mov dword [ebp - 0x114], eax
cmp dword [ebp - 0x114], 0xffffffff
jne 0x5f403f
mov eax, 2
jmp 0x5f40ea
mov dword [ebp - 4], 0
mov dword [ebp - 0x110], 0xffffffff
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x10c]
push ecx
call fcn.006373f0
add esp, 8
lea edx, [ebp - 0x10c]
push edx
call fcn.00637540
add esp, 4
add eax, 5
mov dword [ebp - 0xc], eax
push 0
lea eax, [ebp - 4]
push eax
push 0
push 0
mov ecx, dword [ebp - 0xc]
push ecx
lea edx, [ebp - 0x110]
push edx
push 2
mov eax, dword [ebp - 0x114]
push eax
call dword [sym.imp.kernel32.dll_DeviceIoControl]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x5f40ac
mov eax, 3
jmp 0x5f40ea
mov ecx, dword [ebp + 8]
push ecx
push 0x6fbc40
lea edx, [ebp - 0x214]
push edx
call fcn.006374e0
add esp, 0xc
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.kernel32.dll_DeleteFileA]
lea ecx, [ebp - 0x214]
push ecx
call dword [sym.imp.kernel32.dll_DeleteFileA]
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.kernel32.dll_DeleteFileA]
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x5f40f0
Capabilities:
Create service
Delete service
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push edi
cmp dword [ebp + 0x18], 0
je 0x5f410d
push 8
push 0
mov eax, dword [ebp + 0x18]
push eax
call fcn.00637390
add esp, 0xc
push 0
mov ecx, dword [ebp + 8]
push ecx
call fcn.005f4490
add esp, 8
mov dword [ebp - 8], 0
push 0xf003f
push 0
push 0
call dword [sym.imp.advapi32.dll_OpenSCManagerA]
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], 0
cmp dword [ebp - 4], 0
je 0x5f42b4
mov dword [ebp - 0x10], 3
cmp dword [ebp + 0x14], 0
je 0x5f4159
mov dword [ebp - 0x10], 1
push 0
push 0
push 0
push 0
push 0
mov edx, dword [ebp + 0x10]
push edx
push 1
mov eax, dword [ebp - 0x10]
push eax
push 1
push 0xf01ff
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.advapi32.dll_CreateServiceA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x5f41bf
call dword [sym.imp.kernel32.dll_GetLastError]
cmp eax, 0x431
je 0x5f41a9
call dword [sym.imp.kernel32.dll_GetLastError]
cmp eax, 0x430
jne 0x5f41bf
push 0xf01ff
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.advapi32.dll_OpenServiceA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x5f4291
mov dword [ebp - 0x2c], 0
mov ecx, 6
xor eax, eax
lea edi, [ebp - 0x28]
rep stosd dword es:[edi], eax
push 0
push 0
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.advapi32.dll_StartServiceA]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x5f4231
lea ecx, [ebp - 0x2c]
push ecx
push 4
mov edx, dword [ebp - 0xc]
push edx
call fcn.005f42e0
add esp, 0xc
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x5f422f
cmp dword [ebp + 0x18], 0
je 0x5f4229
mov eax, dword [ebp + 0x18]
mov dword [eax], 4
call dword [sym.imp.kernel32.dll_GetLastError]
mov ecx, dword [ebp + 0x18]
mov dword [ecx + 4], eax
xor edx, edx
test edx, edx
jne 0x5f420e
jmp 0x5f426b
call dword [sym.imp.kernel32.dll_GetLastError]
xor ecx, ecx
cmp eax, 0x420
sete cl
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 0
jne 0x5f426b
cmp dword [ebp + 0x18], 0
je 0x5f4265
mov edx, dword [ebp + 0x18]
mov dword [edx], 3
call dword [sym.imp.kernel32.dll_GetLastError]
mov ecx, dword [ebp + 0x18]
mov dword [ecx + 4], eax
xor edx, edx
test edx, edx
jne 0x5f424a
cmp dword [ebp - 8], 0
jne 0x5f428f
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.advapi32.dll_DeleteService]
cmp dword [ebp - 0xc], 0
je 0x5f428b
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x5f42d8
jmp 0x5f42b2
cmp dword [ebp + 0x18], 0
je 0x5f42ac
mov edx, dword [ebp + 0x18]
mov dword [edx], 2
call dword [sym.imp.kernel32.dll_GetLastError]
mov ecx, dword [ebp + 0x18]
mov dword [ecx + 4], eax
xor edx, edx
test edx, edx
jne 0x5f4291
jmp 0x5f42d5
cmp dword [ebp + 0x18], 0
je 0x5f42cf
mov eax, dword [ebp + 0x18]
mov dword [eax], 1
call dword [sym.imp.kernel32.dll_GetLastError]
mov ecx, dword [ebp + 0x18]
mov dword [ecx + 4], eax
xor edx, edx
test edx, edx
jne 0x5f42b4
mov eax, dword [ebp - 8]
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x5f42e0
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov dword [ebp - 4], 0
cmp dword [ebp + 8], 0
je 0x5f4360
mov eax, 1
test eax, eax
je 0x5f4360
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.advapi32.dll_QueryServiceStatus]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x5f4315
jmp 0x5f4360
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 4]
cmp ecx, dword [ebp + 0xc]
jne 0x5f4322
jmp 0x5f4360
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 0x18]
xor edx, edx
mov ecx, 0xa
div ecx
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x3e8
jae 0x5f4344
mov dword [ebp - 8], 0x3e8
cmp dword [ebp - 8], 0x2710
jbe 0x5f4354
mov dword [ebp - 8], 0x2710
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.kernel32.dll_Sleep]
jmp 0x5f42f3
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret

Function at 0x5f4370
Capabilities:
Query service configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push 0xf003f
push 0
push 0
call dword [sym.imp.advapi32.dll_OpenSCManagerA]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x5f4395
xor eax, eax
jmp 0x5f447d
push 1
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.advapi32.dll_OpenServiceA]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x5f43bf
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x5f447d
lea eax, [ebp - 0xc]
push eax
push 0
push 0
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.advapi32.dll_QueryServiceConfigA]
test eax, eax
jne 0x5f443b
call dword [sym.imp.kernel32.dll_GetLastError]
cmp eax, 0x7a
jne 0x5f4423
mov edx, dword [ebp - 0xc]
push edx
call fcn.00637728
add esp, 4
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.advapi32.dll_QueryServiceConfigA]
test eax, eax
jne 0x5f4421
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x5f447d
jmp 0x5f443b
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x5f447d
mov edx, dword [ebp - 8]
cmp dword [edx + 4], 0
je 0x5f4456
mov eax, dword [ebp - 8]
cmp dword [eax + 4], 1
je 0x5f4456
mov ecx, dword [ebp - 8]
cmp dword [ecx + 4], 2
jne 0x5f445f
mov dword [ebp - 4], 1
jmp 0x5f4466
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret