Function at 0x40fc80
Capabilities:
Read file on windows
Start service
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x48
mov eax, dword [0x422040]
xor eax, esp
mov dword [esp + 0x44], eax
xor eax, eax
mov dword [esp + 0x18], edx
mov edx, dword [ecx]
push esi
push edi
mov dword [esp + 0x24], ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], edx
mov dword [esp + 0x28], eax
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [0x425458]
test esi, esi
je 0x40fcd0
cmp esi, 0xffffffff
je 0x40fcd0
mov eax, esi
mov ecx, eax
mov dword [esp + 0x10], ecx
jmp 0x40fd53
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
push 0x41c9a8
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [0x425458], esi
mov ecx, esi
mov dword [esp + 0x10], ecx
cmp esi, 0xffffffff
jne 0x40fd4f
nop dword [eax]
call edi
cmp eax, 0xe7
jne 0x40fd5b
push 0x4e20
push 0x41c9a8
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeA]
test eax, eax
je 0x40fd5b
call fcn.00410970
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
push 0x41c9a8
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov ecx, esi
mov dword [0x425458], esi
mov dword [esp + 0x10], ecx
cmp ecx, 0xffffffff
je 0x40fd00
mov edx, dword [esp + 0xc]
test eax, eax
jne 0x40fde4
push str.failed_to_connect_to_server._n
call fcn.0040fbd0
add esp, 4
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x40fdce
push 0xf01ff
push 0x41b230
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [esp + 0x2c], eax
test eax, eax
je 0x40fdb3
push 0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
push dword [esp + 0x2c]
neg eax
sbb esi, esi
neg esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x40fdb5
xor esi, esi
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, dword [esp + 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
jne 0x40fcb4
call fcn.00405670
test eax, eax
je 0x40ffbb
mov edx, dword [esp + 0xc]
jmp 0x40fcae
mov eax, dword [edx + 0xc]
xor edi, edi
xor edx, edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x2c], 0
mov dword [esp + 0x14], edx
test eax, eax
je 0x40fe38
mov esi, dword [esp + 0xc]
push 0
lea edx, [esp + 0x30]
sub eax, edi
push edx
push eax
lea eax, [edi + esi]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, eax
mov dword [esp + 0x14], eax
test edx, edx
je 0x40fe32
add edi, dword [esp + 0x2c]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
cmp edi, eax
jb 0x40fe03
mov esi, dword [0x425458]
test edx, edx
je 0x40fe45
mov eax, dword [esp + 0xc]
cmp edi, dword [eax + 0xc]
je 0x40fea2
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0xe8
jne 0x40ffbb
mov esi, dword [esp + 0x28]
mov eax, esi
add esi, 0x1f4
mov dword [esp + 0x28], esi
cmp eax, 0x1388
jge 0x40ffbb
mov eax, dword [0x425458]
test eax, eax
je 0x40fe92
cmp eax, 0xffffffff
je 0x40fe92
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x425458], 0
push esi
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [esp + 0xc]
jmp 0x40fcb4
xorps xmm0, xmm0
mov dword [esp + 0x28], 0
movaps xmmword [esp + 0x30], xmm0
xor edi, edi
push 0
lea eax, [esp + 0x2c]
push eax
mov eax, 0x10
sub eax, edi
push eax
lea eax, [esp + 0x3c]
add eax, edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [esp + 0x10], eax
test eax, eax
je 0x40fee2
add edi, dword [esp + 0x28]
cmp edi, 0x10
jb 0x40feb4
mov dword [esp + 0x18], edi
test eax, eax
je 0x40ff9f
cmp edi, 0x10
jne 0x40ff9f
mov edi, dword [esp + 0x20]
mov eax, dword [edi]
cmp eax, dword [esp + 0x3c]
jae 0x40ff41
push dword [esp + 0xc]
call dword [sym.imp.mfc140.dll_Ordinal_266]
mov ecx, dword [esp + 0x40]
add esp, 4
mov dword [edi], ecx
push ecx
call dword [sym.imp.mfc140.dll_Ordinal_265]
mov esi, eax
add esp, 4
mov eax, dword [esp + 0x24]
mov dword [eax], esi
test esi, esi
jne 0x40ff45
mov eax, dword [esp + 0x10]
pop edi
pop esi
mov ecx, dword [esp + 0x44]
xor ecx, esp
call fcn.00416a63
mov esp, ebp
pop ebp
ret
mov esi, dword [esp + 0xc]
push dword [edi]
push 0
push esi
call sub.VCRUNTIME140.dll_memset
movups xmm0, xmmword [esp + 0x3c]
add esp, 0xc
lea eax, [esp + 0x18]
lea edx, [esi + 0x10]
movups xmmword [esi], xmm0
push eax
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
push eax
call fcn.0040fc00
mov esi, eax
add esp, 8
test esi, esi
je 0x40ff85
mov ecx, dword [esp + 0x3c]
add ecx, 0xfffffff0
cmp dword [esp + 0x18], ecx
je 0x40ff8c
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov eax, esi
pop edi
pop esi
mov ecx, dword [esp + 0x44]
xor ecx, esp
call fcn.00416a63
mov esp, ebp
pop ebp
ret
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov eax, dword [esp + 0x10]
pop edi
pop esi
mov ecx, dword [esp + 0x44]
xor ecx, esp
call fcn.00416a63
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x4c]
pop edi
pop esi
xor ecx, esp
call fcn.00416a63
mov esp, ebp
pop ebp
ret