Function at 0x40c188
Capabilities:
Create service
Hide thread from debugger
Link many functions at runtime
Start service

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x2b
push 0
push 0
dec ecx
jne 0x40c190
push ebx
push esi
xor eax, eax
push ebp
push 0x40c7b9
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x24]
mov edx, dword [0x413b5c]
call fcn.00403bf8
push dword [ebp - 0x24]
push 0x40c7d0
push 0x40c7e0
lea eax, [ebp - 0x20]
mov edx, 3
call fcn.00403ea0
mov edx, 0x4123fc
mov eax, dword [ebp - 0x20]
mov ecx, 0xb
call fcn.00402a0c
lea eax, [ebp - 0x20]
mov ecx, 0x40c7e0
mov edx, dword [ebp - 0x24]
call fcn.00403e2c
mov edx, 0x412418
mov eax, dword [ebp - 0x20]
mov ecx, 7
call fcn.00402a0c
lea eax, [ebp - 0x20]
mov ecx, 0x40c7e0
mov edx, dword [ebp - 0x24]
call fcn.00403e2c
mov edx, 0x412408
mov eax, dword [ebp - 0x20]
mov ecx, 7
call fcn.00402a0c
push 0x40c7e4
push 0xffffffffffffffff
push 0
call sub.OllyDbg.exe__Addtolist
add esp, 0xc
lea eax, [ebp - 0x2c]
mov edx, 0x4123fc
mov ecx, 0xb
call fcn.00403c50
mov ecx, dword [ebp - 0x2c]
lea eax, [ebp - 0x28]
mov edx, 0x40c808
call fcn.00403e2c
mov eax, dword [ebp - 0x28]
call fcn.00403fe0
push eax
push 0xffffffffffffffff
push 0
call sub.OllyDbg.exe__Addtolist
add esp, 0xc
lea eax, [ebp - 0x34]
mov edx, 0x412414
mov ecx, 0x11
call fcn.00403c50
mov ecx, dword [ebp - 0x34]
lea eax, [ebp - 0x30]
mov edx, 0x40c834
call fcn.00403e2c
mov eax, dword [ebp - 0x30]
call fcn.00403fe0
push eax
push 0xffffffffffffffff
push 0
call sub.OllyDbg.exe__Addtolist
add esp, 0xc
lea eax, [ebp - 0x3c]
mov edx, 0x412408
mov ecx, 0xc
call fcn.00403c50
mov ecx, dword [ebp - 0x3c]
lea eax, [ebp - 0x38]
mov edx, 0x40c864
call fcn.00403e2c
mov eax, dword [ebp - 0x38]
call fcn.00403fe0
push eax
push 0xffffffffffffffff
push 0
call sub.OllyDbg.exe__Addtolist
add esp, 0xc
call fcn.0040b9ec
mov edx, eax
lea eax, [ebp - 0x140]
call fcn.00402c70
lea edx, [ebp - 0x140]
lea eax, [ebp - 0x40]
call fcn.00403da8
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x150]
mov edx, 0x4123fc
mov ecx, 0xb
call fcn.00402ca0
lea edx, [ebp - 0x150]
lea eax, [ebp - 0x144]
call fcn.00403da8
mov edx, dword [ebp - 0x144]
pop eax
call fcn.00403de8
mov edx, dword [ebp - 0x40]
mov eax, 0x413aa8
call fcn.00403bb4
mov eax, dword [0x413aa8]
call fcn.00405dfc
mov eax, dword [0x413aa8]
call fcn.00403fe0
mov ecx, eax
mov eax, 0x40c890
mov edx, 0xa
call fcn.0040b978
test eax, eax
jne 0x40c36f
or ebx, 0xffffffff
jmp 0x40c783
mov eax, 0x4139c4
mov edx, 0x65
call fcn.00404e74
mov eax, 0x4138c4
mov edx, pe_nt_image_headers32
call fcn.00404e74
lea eax, [ebp - 0x20]
mov edx, dword [0x413aa8]
call fcn.00403bf8
mov eax, dword [ebp - 0x20]
call fcn.00405dec
test al, al
jne 0x40c3b1
mov ebx, 0xfffffffc
jmp 0x40c783
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
mov eax, dword [ebp - 0x20]
call fcn.00403fe0
push eax
call sub.kernel32.dll_CreateFileA
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40c3e2
mov ebx, 0xfffffff9
jmp 0x40c783
lea eax, [ebp - 0x154]
mov ecx, 0x40c7e0
mov edx, dword [ebp - 0x24]
call fcn.00403e2c
mov ecx, dword [ebp - 0x154]
mov edx, 0x1010
mov eax, ebx
call fcn.0040ae10
lea eax, [ebp - 0x158]
mov ecx, 0x40c7e0
mov edx, dword [ebp - 0x24]
call fcn.00403e2c
mov ecx, dword [ebp - 0x158]
mov edx, 0x1032
mov eax, ebx
call fcn.0040ae10
push ebx
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x20]
call fcn.0040b7a4
mov esi, eax
test esi, esi
jne 0x40c44a
mov ebx, 0xfffffff8
jmp 0x40c783
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
mov eax, dword [ebp - 0x20]
call fcn.00403fe0
push eax
call sub.kernel32.dll_CreateFileA
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40c47b
mov ebx, 0xfffffff7
jmp 0x40c783
mov ecx, esi
mov edx, 0x120
mov eax, ebx
call fcn.0040ade4
push ebx
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x20]
call fcn.00403de0
mov ecx, eax
mov edx, 0x4138c4
mov eax, dword [ebp - 0x20]
call fcn.00402a0c
mov eax, 0x40c8a0
call fcn.0040b86c
mov dword [ebp - 0xc], eax
mov eax, 0x40c8b8
call fcn.0040b86c
mov dword [ebp - 8], eax
call sub.kernel32.dll_GetCurrentProcessId
mov dword [ebp - 4], eax
cmp dword [ebp - 0xc], 0
je 0x40c4da
cmp dword [ebp - 8], 0
je 0x40c4da
cmp dword [ebp - 4], 0
jne 0x40c4e4
mov ebx, 0xfffffffe
jmp 0x40c783
cmp dword [0x4138b0], 0
je 0x40c508
cmp dword [0x4138b8], 0
je 0x40c508
cmp dword [0x4138bc], 0
je 0x40c508
cmp dword [0x4138b4], 0
jne 0x40c50f
xor eax, eax
mov dword [ebp - 0x1c], eax
jmp 0x40c516
mov dword [ebp - 0x1c], 1
pushal
push 2
push 0
push 0
call sub.advapi32.dll_OpenSCManagerA
test eax, eax
je 0x40c739
mov dword [0x413a2c], eax
push 0
push 0
push 0
push 0
push 0
push 0x4138c4
push 0
push 3
push 1
push 0xf01ff
push 0x412408
push 0x4123fc
push dword [0x413a2c]
call sub.advapi32.dll_CreateServiceA
test eax, eax
je 0x40c716
mov dword [0x413a34], eax
push 0
push 0
push eax
call sub.advapi32.dll_StartServiceA
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
push 0x412414
call sub.kernel32.dll_CreateFileA
mov dword [0x413a3c], eax
nop
call fcn.0040ba08
nop
mov dword [0x4139c4], 0x484f4f4b
push 0x412488
push dword [0x413acc]
call sub.kernel32.dll_GetProcAddress_1
mov eax, dword [eax + 1]
mov dword [0x4139c8], eax
push 0x4124a4
push dword [0x413acc]
call sub.kernel32.dll_GetProcAddress_1
mov eax, dword [eax + 1]
mov dword [0x4139cc], eax
push 0x4124b4
push dword [0x413acc]
call sub.kernel32.dll_GetProcAddress_1
mov ebx, eax
mov eax, dword [eax + 1]
cmp eax, 0x50
jb 0x40c5f7
mov eax, ebx
call fcn.0040c158
mov dword [0x4139d0], eax
mov eax, dword [0x413a68]
test eax, eax
je 0x40c61f
push 0x4124d4
push dword [0x413acc]
call sub.kernel32.dll_GetProcAddress_1
mov eax, dword [eax + 1]
mov dword [0x413a00], eax
push 0x4124bc
push dword [0x413acc]
call sub.kernel32.dll_GetProcAddress_1
mov eax, dword [eax + 1]
mov dword [0x4139d4], eax
mov eax, dword [ebp - 4]
mov dword [0x4139d8], eax
mov eax, dword [ebp - 8]
mov dword [0x4139dc], eax
mov eax, dword [ebp - 0xc]
mov dword [0x4139e0], eax
push 0x412464
push dword [0x413acc]
call sub.kernel32.dll_GetProcAddress_1
mov eax, dword [eax + 1]
mov dword [ebp - 0x10], eax
push 0x412478
push dword [0x413acc]
call sub.kernel32.dll_GetProcAddress_1
mov eax, dword [eax + 1]
mov dword [ebp - 0x14], eax
push 0x412448
push dword [0x413acc]
call sub.kernel32.dll_GetProcAddress_1
mov eax, dword [eax + 1]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x10]
mov dword [0x4139e4], eax
mov eax, dword [ebp - 0x14]
mov dword [0x4139e8], eax
mov eax, dword [ebp - 0x18]
mov dword [0x4139ec], eax
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40c6ec
mov eax, dword [0x413a80]
test eax, eax
je 0x40c6ec
mov eax, dword [0x4138b8]
mov dword [0x4139f0], eax
mov eax, dword [0x4138bc]
mov dword [0x4139f4], eax
mov eax, dword [0x4138b4]
mov dword [0x4139f8], eax
mov eax, dword [0x4138b0]
mov dword [0x4139fc], eax
push 0
push 0x413b58
push pe_nt_image_headers32
push 0x4139c4
push pe_nt_image_headers32
push 0x4139c4
push 0x30
push dword [0x413a3c]
call sub.kernel32.dll_DeviceIoControl
jmp 0x40c739
push 0xf003f
push 0x4123fc
push dword [0x413a2c]
call sub.advapi32.dll_OpenServiceA
test eax, eax
je 0x40c739
mov dword [0x413a34], eax
jmp 0x40c56b
popal
cmp dword [0x413a2c], 0
jbe 0x40c774
cmp dword [0x413a34], 0
jbe 0x40c774
cmp dword [0x413a3c], 0
jbe 0x40c774
cmp dword [0x413a2c], 0xffffffff
jae 0x40c774
cmp dword [0x413a34], 0xffffffff
jae 0x40c774
cmp dword [0x413a3c], 0xffffffff
jae 0x40c774
xor ebx, ebx
jmp 0x40c779
mov ebx, 0xfffffffd
mov eax, dword [0x413aa8]
call fcn.00405dfc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40c7c0
lea eax, [ebp - 0x158]
mov edx, 2
call fcn.00403b84
lea eax, [ebp - 0x144]
call fcn.00403b60
lea eax, [ebp - 0x40]
mov edx, 9
call fcn.00403b84
ret