joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4019e0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x407658]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x401a22
call edi
mov esi, eax
test esi, esi
je 0x401a0c
mov eax, 1
jmp 0x401a1d
call ebp
mov ebx, eax
test ebx, ebx
je 0x401b2f
mov eax, 2
mov dword [0x407658], eax
cmp eax, 1
jne 0x401ac2
test esi, esi
jne 0x401a3b
call edi
mov esi, eax
test esi, esi
je 0x401b2f
cmp word [esi], 0
mov eax, esi
je 0x401a55
add eax, 2
cmp word [eax], 0
jne 0x401a43
add eax, 2
cmp word [eax], 0
jne 0x401a43
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x401ab4
push edi
call fcn.004026b0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x401ab4
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x401aa6
push ebx
call fcn.00402660
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x401b2f
test ebx, ebx
jne 0x401ad3
call ebp
mov ebx, eax
test ebx, ebx
je 0x401b2f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x401aeb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x401adb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x401adb
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.004026b0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x401b0d
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x402480
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x405228
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x4024a4
add eax, 8
inc ebp
cmp eax, 0x4052b8
jb 0x402495
cmp ecx, dword [ebp*8 + 0x405228]
jne 0x40264b
mov eax, dword [0x4074f8]
cmp eax, 1
je 0x40260d
test eax, eax
jne 0x4024d0
cmp dword [0x405080], 1
je 0x40260d
cmp ecx, 0xfc
je 0x40264b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40250b
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x402554
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x404388
add ebx, ecx
push ebx
call fcn.004032b0
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x404368
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x40522c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00403220
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x4078e0]
test eax, eax
je 0x40261e
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x402628
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x40522c]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
Function at 0x4011a0
Capabilities:
Check mutex on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x418b7b
push eax
mov dword fs:[0], esp
push ebp
push esi
push edi
call dword [sym.imp.KERNEL32.dll_FreeConsole]
push str.CesarFTP_0.98b
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [0x41ed04], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x401216
mov eax, dword [0x41ed04]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x10
push str.Multiple_instances_not_allowed
push str.CesarFTP_0.98b_is_already_running___n_You_cant_run_multiple_instances_of_the_server.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, 1
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
add esp, 0xc
ret
cmp eax, 5
jne 0x401246
push 0x10
push str.Multiple_instances_not_allowed
push str.CesarFTP_0.98b_is_already_running___n_You_cannot_run_multiple_instances_of_the_server.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, 1
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
add esp, 0xc
ret
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0
mov dword [0x41ed08], eax
call dword [sym.imp.MSVCRT.dll_time]
push eax
call dword [sym.imp.MSVCRT.dll_srand]
add esp, 8
mov ecx, 0x41ed28
push 1
call fcn.00414260
mov eax, dword [esp + 0x1c]
cmp eax, 1
jle 0x401317
mov ecx, dword [esp + 0x20]
dec eax
mov dword [esp + 0x1c], eax
lea ebp, [ecx + 4]
mov edi, dword [ebp]
mov esi, 0x41d15c
mov eax, edi
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4012be
test cl, cl
je 0x4012ba
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4012be
add eax, 2
add esi, 2
test cl, cl
jne 0x40129a
xor eax, eax
jmp 0x4012c3
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4012fb
mov esi, 0x41d158
mov eax, edi
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4012f2
test cl, cl
je 0x4012ee
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4012f2
add eax, 2
add esi, 2
test cl, cl
jne 0x4012ce
xor eax, eax
jmp 0x4012f7
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x401305
mov dword [0x41eaf8], 1
mov eax, dword [esp + 0x1c]
add ebp, 4
dec eax
mov dword [esp + 0x1c], eax
jne 0x401290
push 0x24
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
mov dword [esp + 0x14], 0
je 0x40133a
mov ecx, eax
call fcn.00405220
jmp 0x40133c
xor eax, eax
mov ecx, eax
mov dword [esp + 0x14], 0xffffffff
mov dword [0x41ed20], eax
call fcn.00405270
mov eax, dword [0x41eaf4]
test eax, eax
jne 0x40136d
call fcn.004013d0
test eax, eax
jne 0x40136d
mov ecx, dword [0x41ed0c]
call fcn.00402250
call fcn.004015a0
push 1
mov ecx, 0x41ed28
call fcn.00414330
mov ecx, dword [0x41ed20]
test ecx, ecx
je 0x401398
mov eax, dword [ecx]
push 1
call dword [eax]
mov dword [0x41ed20], 0
mov ecx, dword [0x41ed08]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [0x41ed04]
push edx
call esi
mov ecx, dword [esp + 0xc]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebp
add esp, 0xc
ret
Function at 0x401c20
Capabilities:
Enumerate files on windows

Disassembly:
push 0xffffffffffffffff
push 0x418beb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14c
mov eax, dword [esp + 0x15c]
push ebp
push esi
push edi
push eax
lea ecx, [esp + 0x10]
call fcn.00416780
mov edx, dword [esp + 0xc]
mov dword [esp + 0x160], 0
test edx, edx
mov edi, edx
jne 0x401c69
mov edi, 0x41eae8
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [ecx + edx - 1]
mov ecx, dword [esp + 0x16c]
push ecx
push 0
lea ecx, [esp + 0x14]
mov byte [eax], 0
call fcn.00416dc0
push 0x41d300
push 0
lea ecx, [esp + 0x14]
call fcn.00416dc0
mov eax, dword [esp + 0xc]
test eax, eax
jne 0x401caa
mov eax, 0x41eae8
lea edx, [esp + 0x18]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x401d74
mov ebp, dword [sym.imp.KERNEL32.dll_FindNextFileA]
mov esi, 0x41d2fc
lea eax, [esp + 0x44]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x401cf4
test cl, cl
je 0x401cf0
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x401cf4
add eax, 2
add esi, 2
test cl, cl
jne 0x401cd0
xor eax, eax
jmp 0x401cf9
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x401d3a
mov esi, 0x41d2f8
lea eax, [esp + 0x44]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x401d2a
test cl, cl
je 0x401d26
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x401d2a
add eax, 2
add esi, 2
test cl, cl
jne 0x401d06
xor eax, eax
jmp 0x401d2f
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x401d3a
test byte [esp + 0x18], 0x10
jne 0x401d4b
lea eax, [esp + 0x18]
push eax
push edi
call ebp
test eax, eax
je 0x401d6d
jmp 0x401cc7
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
lea ecx, [esp + 0xc]
mov dword [esp + 0x160], 0xffffffff
call fcn.004167e0
mov eax, 1
jmp 0x401d8a
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
lea ecx, [esp + 0xc]
mov dword [esp + 0x160], 0xffffffff
call fcn.004167e0
xor eax, eax
mov ecx, dword [esp + 0x158]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x158
ret
Function at 0x4039b0
Capabilities:
Get disk information

Disassembly:
sub esp, 0x10
push esi
mov esi, ecx
mov eax, dword [esi + 0x1c]
cmp dword [eax + 4], 0xc
je 0x4039cf
push 1
push 1
mov ecx, esi
call fcn.00402710
pop esi
add esp, 0x10
ret
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
lea ecx, [esp + 4]
mov dword [esp + 0x10], eax
push ecx
push 0x27
push 0x10
call fcn.00417270
mov edx, dword [esp + 0x14]
mov ecx, dword [esi + 4]
add esp, 0xc
lea eax, [esp + 4]
push edx
push eax
call fcn.00415f80
pop esi
add esp, 0x10
ret

Function at 0x403cc0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x418cf1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
mov esi, ecx
push edi
xor edi, edi
lea ecx, [esi + 0x10]
mov dword [esp + 0xc], esi
mov dword [esi + 8], edi
call fcn.00416770
lea ecx, [esi + 0x1c]
mov dword [esp + 0x18], edi
call fcn.00416770
mov al, byte [esp + 0xb]
push 0x14
mov byte [esp + 0x1c], 1
mov byte [esi + 0x28], al
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [esi + 0x2c], eax
mov dword [esi + 0x30], edi
mov cl, byte [esp + 0xf]
push 0xc
mov byte [esp + 0x20], 2
mov byte [esi + 0x34], cl
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 8
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [esi + 0x38], eax
push edi
mov dword [esi + 0x3c], edi
push edi
mov dword [esi], 0x41a260
mov dword [esi + 0x50], edi
mov dword [esi + 0x54], edi
mov dword [esi + 0x40], 0xffffffff
mov dword [esi + 0x44], edi
mov dword [esi + 0x4c], edi
mov dword [esi + 0x48], edi
push edi
mov word [esi + 0xc], di
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov ecx, dword [esp + 0x10]
mov dword [esi + 4], eax
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x404e90
Capabilities:
Get file size
Read file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x418e5b
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
push edi
mov esi, ecx
call fcn.00403f00
mov edi, dword [esp + 0x20]
lea ecx, [esi + 0x10]
push edi
call fcn.00416890
push 0
push 0x80
push 3
push 0
push 1
push bind
push edi
mov dword [esi + 0x54], 0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
or edi, 0xffffffff
mov dword [esi + 0x40], eax
cmp eax, edi
jne 0x404f28
push 0xc
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 8], eax
test eax, eax
mov dword [esp + 0x18], 0
je 0x404f0f
push 0
push 1
mov ecx, eax
call fcn.00401000
jmp 0x404f11
xor eax, eax
mov dword [esp + 0x20], eax
lea eax, [esp + 0x20]
push 0x41a4e0
push eax
mov dword [esp + 0x20], edi
call sub.MSVCRT.dll__CxxThrowException
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 0x48], eax
inc eax
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
mov edx, dword [esi + 0x48]
add esp, 4
lea ecx, [esp + 0xc]
mov dword [esi + 0x44], eax
push 0
push ecx
push edx
push eax
mov eax, dword [esi + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esi + 0x48]
mov edx, dword [esi + 0x44]
mov byte [ecx + edx], 0
mov eax, dword [esi + 0x40]
cmp eax, edi
je 0x404f73
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x40], edi
mov ecx, esi
call fcn.00404430
mov ecx, dword [esp + 0x10]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret 4

Function at 0x405350
Capabilities:
Create service
Persist via windows service

Disassembly:
sub esp, 0x200
lea eax, [esp]
push 0x200
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x405378
mov eax, 1
add esp, 0x200
ret
push ebx
push esi
push edi
mov edi, 0x41d498
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0xc]
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
push 0xf003f
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
test esi, esi
je 0x40541f
push 0
push 0
push 0x41eae8
push 0
lea eax, [esp + 0x1c]
push 0
push eax
push 1
push 2
push 0x110
push 0xf01ff
push str.CesarFTP_FTP_Server
push str.CesarFTP_0.98b
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
je 0x40540b
push eax
call ebx
push esi
xor edi, edi
call ebx
mov eax, edi
pop edi
pop esi
pop ebx
add esp, 0x200
ret
push esi
mov edi, 1
call ebx
mov eax, edi
pop edi
pop esi
pop ebx
add esp, 0x200
ret
mov edi, 1
mov eax, edi
pop edi
pop esi
pop ebx
add esp, 0x200
ret
Function at 0x405430
Capabilities:
Persist via run registry key
Set registry value

Disassembly:
push ecx
push edi
lea eax, [esp + 4]
push 0
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionRunServices
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov edi, 0x41eafc
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
mov ecx, dword [esp + 8]
push 0x41eafc
push 1
push eax
push str.CesarFTP_Server
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop edi
pop ecx
ret

Function at 0x405490
Capabilities:
Delete registry value
Persist via run registry key

Disassembly:
push ecx
lea eax, [esp]
push 0
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionRunServices
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov ecx, dword [esp]
push str.CesarFTP_Server
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
xor eax, eax
pop ecx
ret

Function at 0x4054d0
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
sub esp, 0x1c
push ebp
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebp, eax
test ebp, ebp
je 0x405566
push esi
push 0xf01ff
push str.CesarFTP_0.98b
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
je 0x40555e
push ebx
lea eax, [esp + 0xc]
push edi
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x40554e
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x3e8
call edi
mov ebx, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea ecx, [esp + 0x10]
push ecx
push esi
call ebx
test eax, eax
je 0x40554e
cmp dword [esp + 0x14], 3
jne 0x40554e
push 0x5dc
call edi
lea edx, [esp + 0x10]
push edx
push esi
call ebx
test eax, eax
jne 0x405534
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop ebx
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
pop ebp
add esp, 0x1c
ret
Function at 0x405850
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x418ee8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24
push ebp
push esi
push edi
mov esi, ecx
call fcn.00405770
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x44]
mov dword [esi + 0x140], ecx
lea ecx, [esp + 0x24]
mov dword [esi + 0x150], eax
call fcn.00416770
mov ebp, dword [esp + 0x40]
lea ecx, [esp + 0x18]
push ebp
mov dword [esp + 0x3c], 0
call fcn.004167a0
lea ecx, [esp + 0xc]
mov byte [esp + 0x38], 1
call fcn.00416770
lea edx, [esp + 0xc]
lea ecx, [esp + 0x18]
push edx
mov byte [esp + 0x3c], 2
call fcn.00417120
mov eax, dword [esp + 0xc]
test eax, eax
jne 0x4058d3
mov eax, 0x41eae8
push 0x41d4e4
push eax
call dword [sym.imp.MSVCRT.dll_strpbrk]
add esp, 8
test eax, eax
je 0x4058f8
lea eax, [esp + 0xc]
lea ecx, [esi + 0x154]
push eax
call fcn.00416cf0
jmp 0x40594b
lea ecx, [esp + 0x44]
mov dword [esp + 0x44], 0x10e40
push ecx
mov ecx, dword [esi + 0x150]
push 0
push ebp
call fcn.00406e90
mov edi, eax
test edi, edi
jne 0x4059f8
mov eax, dword [esp + 0x44]
test ah, 8
je 0x405933
lea edx, [esp + 0xc]
lea ecx, [esi + 0x154]
push edx
jmp 0x405938
push ebp
lea ecx, [esp + 0x1c]
call fcn.00416cf0
push 0x41d300
lea ecx, [esp + 0x10]
call fcn.00416c90
lea eax, [esi + 0x148]
lea ecx, [esp + 0x18]
push eax
mov dword [eax], 0x640
lea eax, [esp + 0x28]
push eax
push ecx
mov ecx, dword [esi + 0x150]
call fcn.00406e90
mov edi, eax
test edi, edi
jne 0x4059f8
mov ecx, dword [esi + 0x150]
lea edx, [esp + 0x18]
push edx
call fcn.00406cf0
mov dword [esi + 0x16c], eax
mov dword [esi + 0x164], eax
mov eax, dword [esi + 0x150]
mov ecx, dword [eax + 0x14]
test ecx, ecx
je 0x4059b0
lea edx, [esp + 0x18]
push edx
call fcn.00406cf0
mov dword [esi + 0x170], eax
mov eax, dword [esi + 0x16c]
test eax, eax
jne 0x4059ca
mov eax, dword [esi + 0x170]
test eax, eax
je 0x4059ca
mov dword [esi + 0x164], eax
mov ecx, dword [esp + 0x4c]
test ecx, ecx
je 0x4059dc
lea eax, [esp + 0x24]
push eax
call fcn.00416cf0
mov eax, dword [esp + 0xc]
test eax, eax
jne 0x4059e9
mov eax, 0x41eae8
lea ecx, [esp + 0x24]
push eax
push ecx
mov ecx, esi
call fcn.00405a40
mov edi, eax
lea ecx, [esp + 0xc]
mov byte [esp + 0x38], 1
call fcn.004167e0
lea ecx, [esp + 0x18]
mov byte [esp + 0x38], 0
call fcn.004167e0
lea ecx, [esp + 0x24]
mov dword [esp + 0x38], 0xffffffff
call fcn.004167e0
mov ecx, dword [esp + 0x30]
mov eax, edi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x30
ret 0x10
Function at 0x406560
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x418f70
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
push esi
push edi
mov edi, ecx
lea ecx, [esp + 0x14]
call fcn.00416770
lea ecx, [esp + 8]
mov dword [esp + 0x28], 0
call fcn.00416770
mov eax, dword [esp + 0x30]
lea ecx, [esp + 8]
push eax
mov byte [esp + 0x2c], 1
mov esi, 1
call fcn.00416cf0
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0xc]
call fcn.00417120
lea ecx, [esp + 0x14]
call fcn.00416c50
test eax, eax
jne 0x4065e6
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x34]
push edx
lea ecx, [esp + 0x18]
push eax
lea edx, [esp + 0x10]
push ecx
push edx
mov ecx, edi
call fcn.00406300
mov esi, eax
lea ecx, [esp + 8]
mov byte [esp + 0x28], 0
call fcn.004167e0
lea ecx, [esp + 0x14]
mov dword [esp + 0x28], 0xffffffff
call fcn.004167e0
mov ecx, dword [esp + 0x20]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x24
ret 0xc

Function at 0x406860
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x418fd0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0x14]
call fcn.00416770
lea ecx, [esp + 8]
mov dword [esp + 0x28], 0
call fcn.00416770
mov eax, dword [esp + 0x30]
lea ecx, [esp + 8]
push eax
mov byte [esp + 0x2c], 1
mov edi, 1
call fcn.00416cf0
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0xc]
call fcn.00417120
lea ecx, [esp + 0x14]
call fcn.00416c50
test eax, eax
jne 0x4068e9
lea edx, [esp + 8]
mov ecx, esi
push edx
call fcn.00406cf0
test eax, eax
je 0x4068e9
lea ecx, [esp + 0x14]
push edi
push ecx
push eax
mov ecx, esi
call fcn.00406720
mov edi, eax
lea ecx, [esp + 8]
mov byte [esp + 0x28], 0
call fcn.004167e0
lea ecx, [esp + 0x14]
mov dword [esp + 0x28], 0xffffffff
call fcn.004167e0
mov ecx, dword [esp + 0x20]
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x24
ret 4