Function at 0x40ca00
Capabilities:
Check if file exists
Create process on windows
Create process suspended
Get file attributes
Query service configuration

Disassembly:
push 0xffffffffffffffff
push 0x4b5b77
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x570
push ebx
push ebp
push esi
xor ebx, ebx
push edi
lea eax, [esp + 0x1c]
push ebx
push eax
call fcn.0044dec0
mov ecx, dword [0x4dbb94]
mov dword [esp + 0x588], ebx
mov dword [esp + 0x10], ecx
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x10]
push edx
mov byte [esp + 0x58c], 1
call fcn.0049d28c
push str.OServer3.exe
lea ecx, [esp + 0x14]
call fcn.0049d4b8
mov eax, dword [esp + 0x10]
xor ebp, ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40cc4a
push 1
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
cmp edi, ebx
mov dword [esp + 0x24], edi
jne 0x40caba
lea ecx, [esp + 0x10]
mov byte [esp + 0x588], 0
call fcn.0049d0dc
lea ecx, [esp + 0x1c]
mov dword [esp + 0x588], 0xffffffff
call fcn.0043f140
mov eax, 1
jmp 0x40cfcc
push 1
push str.OSERVER3
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
cmp esi, ebx
je 0x40cbf3
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x181]
mov byte [esp + 0x180], 0
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x20]
lea edx, [esp + 0x180]
stosw word es:[edi], ax
push ecx
push 0x400
push edx
push esi
stosb byte es:[edi], al
mov dword [esp + 0x30], ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test eax, eax
je 0x40cbfa
mov eax, dword [esp + 0x18c]
lea ecx, [esp + 0x10]
push eax
call fcn.0049d265
lea ecx, [esp + 0x14]
push 1
push ecx
lea ecx, [esp + 0x18]
call fcn.004965ef
mov eax, dword [eax]
push 0x4db42c
push eax
call fcn.0041fea4
add esp, 8
lea ecx, [esp + 0x14]
test eax, eax
sete bl
call fcn.0049d0dc
test bl, bl
je 0x40cba0
push 1
push 0
lea ecx, [esp + 0x18]
call fcn.00496138
push 0x22
lea ecx, [esp + 0x14]
call fcn.0049d5fd
test eax, eax
jl 0x40cbe1
lea edx, [esp + 0x14]
push eax
push edx
lea ecx, [esp + 0x18]
call fcn.004965ef
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x58c], 2
call fcn.0049d215
mov byte [esp + 0x588], 1
lea ecx, [esp + 0x14]
jmp 0x40cbdc
push 0x20
lea ecx, [esp + 0x14]
call fcn.0049d5fd
test eax, eax
jl 0x40cbe1
push eax
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x18]
call fcn.004965ef
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x58c], 3
call fcn.0049d215
mov byte [esp + 0x588], 1
lea ecx, [esp + 0x14]
call fcn.0049d0dc
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40cc01
jmp 0x40cc06
mov ebp, 2
jmp 0x40cc13
mov ebp, 3
jmp 0x40cc08
mov ebp, 4
xor ebx, ebx
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, dword [esp + 0x24]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp ebp, ebx
je 0x40cc4a
lea ecx, [esp + 0x10]
mov byte [esp + 0x588], 0
call fcn.0049d0dc
lea ecx, [esp + 0x1c]
mov dword [esp + 0x588], 0xffffffff
call fcn.0043f140
mov eax, ebp
jmp 0x40cfcc
mov edx, dword [0x4dbb94]
mov dword [esp + 0x18], edx
mov byte [esp + 0x588], 4
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
lea eax, [esp + 0x1c]
push str.OCULAR3__lu
push eax
call fcn.00496a65
mov ecx, dword [esp + 0x24]
add esp, 0xc
push ecx
push 0x1000
push ebx
push 4
push ebx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
cmp eax, ebx
mov dword [esp + 0x14], eax
jne 0x40ccd3
lea ecx, [esp + 0x18]
mov byte [esp + 0x588], 1
call fcn.0049d0dc
lea ecx, [esp + 0x10]
mov byte [esp + 0x588], 0
call fcn.0049d0dc
lea ecx, [esp + 0x1c]
mov dword [esp + 0x588], 0xffffffff
call fcn.0043f140
mov eax, 0x11
jmp 0x40cfcc
push ebx
push ebx
push ebx
push 0xf001f
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebp, eax
cmp ebp, ebx
je 0x40cf76
mov ecx, 0x400
xor eax, eax
mov edi, ebp
rep stosd dword es:[edi], eax
mov edi, str.11A988EC391A445eBDE38A038F2767D7
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x40
lea edi, [esp + 0x7d]
mov byte [esp + 0x7c], al
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x7c]
push eax
push str.Oserver3.exe__sn__s
push ecx
call fcn.00420780
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x48]
mov dword [esp + 0x44], ebx
add esp, 0xc
xor edx, edx
rep stosd dword es:[edi], eax
lea eax, [esp + 0x28]
lea ecx, [esp + 0x38]
push eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x30], edx
push ecx
push ebx
mov dword [esp + 0x3c], edx
push ebx
push 0x20
mov dword [esp + 0x48], edx
push ebx
push ebx
lea edx, [esp + 0x98]
push ebx
push edx
push eax
mov dword [esp + 0x50], ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
cmp eax, ebx
je 0x40cf7d
mov ecx, dword [esp + 0x28]
push 0xea60
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x20]
push edx
push eax
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x40cf15
mov ebx, dword [esp + 0x20]
cmp ebx, 0x64
jne 0x40cf1c
mov esi, dword [ebp]
xor ecx, ecx
mov cx, word [ebp + 0x1c]
mov dword [esp + 0x24], esi
lea edx, [ecx + ecx + 0x22]
cmp esi, edx
jne 0x40cf2a
mov ecx, dword [esp + 0x590]
mov eax, dword [ebp + 4]
mov dword [ecx], eax
mov eax, dword [esp + 0x594]
mov edx, dword [ebp + 8]
lea ecx, [ebp + 0x24]
push ecx
mov ecx, dword [esp + 0x59c]
mov dword [eax], edx
call fcn.0043f420
mov eax, dword [esp + 0x59c]
mov edx, dword [ebp + 0xc]
mov dword [eax], edx
mov ecx, dword [ebp + 0x10]
mov dword [eax + 4], ecx
mov eax, dword [esp + 0x5a0]
mov edx, dword [ebp + 0x18]
mov dword [eax], edx
mov ebx, dword [esi + ebp + 4]
lea ecx, [ebx + esi + 8]
cmp ecx, 0x1000
ja 0x40cf3a
mov edi, dword [esp + 0x5a4]
push 0xffffffffffffffff
push ebx
mov ecx, edi
call fcn.004999e2
test ebx, ebx
jbe 0x40ce6b
mov edi, dword [edi + 4]
mov ecx, ebx
mov edx, ecx
lea esi, [esi + ebp + 8]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x5a8]
lea eax, [ebx + esi]
lea edi, [eax + ebp]
mov dword [ecx], 0
mov eax, dword [edi + 8]
test eax, eax
je 0x40cf11
lea edx, [eax + ebx]
lea edx, [edx + esi + 0xc]
cmp edx, 0x1000
ja 0x40cf48
mov edx, dword [edi + 0x24]
mov esi, dword [edi + 0x28]
lea edx, [esi + edx*2 + 0x23]
cmp eax, edx
jne 0x40cf54
mov eax, dword [edi + 0xc]
test eax, eax
mov dword [ecx], eax
je 0x40cf11
mov ecx, dword [esp + 0x5b8]
mov eax, dword [edi + 0x10]
mov dword [ecx], eax
mov eax, dword [esp + 0x5ac]
mov edx, dword [edi + 0x14]
mov dword [eax], edx
mov eax, dword [esp + 0x5b4]
mov ecx, dword [edi + 0x1c]
mov dword [eax], ecx
mov edx, dword [edi + 0x20]
mov ecx, dword [esp + 0x5b0]
mov dword [eax + 4], edx
lea eax, [edi + 0x2c]
push eax
call fcn.0043f420
mov edx, dword [esp + 0x5bc]
mov ecx, dword [edi + 0x18]
mov dword [edx], ecx
mov eax, dword [edi + 0x24]
lea ecx, [edi + eax*2 + 0x2e]
push ecx
mov ecx, dword [esp + 0x5c4]
call fcn.00439aa0
xor ebx, ebx
jmp 0x40cf60
mov ebx, 0x14
jmp 0x40cf60
and ebx, 0xffff
shl ebx, 0x10
or ebx, 0x15
jmp 0x40cf60
and esi, 0xffff
shl esi, 0x10
or esi, 0x16
mov ebx, esi
jmp 0x40cf60
and ebx, 0xffff
shl ebx, 0x10
or ebx, 0x17
jmp 0x40cf60
and eax, 0xffff
shl eax, 0x10
or al, 0x18
jmp 0x40cf5e
and eax, 0xffff
shl eax, 0x10
or al, 0x19
mov ebx, eax
mov edx, dword [esp + 0x28]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
mov eax, dword [esp + 0x2c]
push eax
call esi
jmp 0x40cf82
mov ebx, 0x12
jmp 0x40cf89
mov ebx, 0x13
push ebp
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x18]
mov byte [esp + 0x588], 1
call fcn.0049d0dc
lea ecx, [esp + 0x10]
mov byte [esp + 0x588], 0
call fcn.0049d0dc
lea ecx, [esp + 0x1c]
mov dword [esp + 0x588], 0xffffffff
call fcn.0043f140
mov eax, ebx
mov ecx, dword [esp + 0x580]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x57c
ret