Function at 0x402e60
Capabilities:
Check if file exists
Create thread
Get hostname
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5d0
mov eax, dword [0x4250d0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x5b8], eax
mov eax, dword [ebp + 0x1c]
push ebx
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x5c8], eax
mov eax, dword [ebp + 0x20]
push esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x5c4], eax
mov eax, dword [ebp + 0x24]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x5c0], eax
lea eax, [ebp - 0x5d0]
push eax
lea eax, [ebp - 0x414]
mov dword [ebp - 0x5d0], 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
lea eax, [ebp - 0x414]
push esi
push eax
call fcn.004053a7
add esp, 8
test eax, eax
jne 0x403080
push str.Connecting_to_local_system...
mov byte [ebp - 0x5bc], 1
call fcn.00402e20
add esp, 4
cmp byte [0x4262e5], 0
jne 0x402f0e
lea eax, [ebp - 0x5a4]
push eax
push 0x202
call sub.WS2_32.dll_WSAStartup
mov byte [0x4262e5], 1
push 0x104
lea eax, [ebp - 0x310]
push eax
call sub.WS2_32.dll_gethostname
lea eax, [ebp - 0x310]
push eax
call sub.WS2_32.dll_gethostbyname
movsx ecx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
push ecx
push dword [eax]
lea eax, [ebp - 0x5b0]
push eax
call fcn.00405770
add esp, 0xc
push dword [ebp - 0x5b0]
call sub.WS2_32.dll_inet_ntoa
lea edx, [ebp - 0x108]
sub edx, eax
mov cl, byte [eax]
lea eax, [eax + 1]
mov byte [edx + eax - 1], cl
test cl, cl
jne 0x402f57
mov ecx, dword [ebp + 0x30]
lea eax, [ebp - 0x108]
push ecx
mov ecx, dword [ebp - 0x5c0]
push ecx
mov ecx, dword [ebp - 0x5c4]
push ecx
mov ecx, dword [ebp - 0x5c8]
push ecx
mov ecx, dword [ebp - 0x5b8]
push ecx
mov ecx, dword [ebp + 8]
push ebx
push edi
push dword [ebp - 0x5bc]
push eax
push esi
push ecx
call fcn.00403440
add esp, 0x2c
test al, al
je 0x403154
call fcn.00402670
cmp byte [ebp - 0x5bc], 0
mov eax, str.local_system
cmove eax, esi
push eax
push edi
push str._rStarting__s_service_on__s...
call fcn.00402e20
push dword [ebp - 0x5b8]
lea eax, [ebp - 0x20c]
push str.__SystemRoot___s
push eax
call fcn.00405242
push dword [ebp + 0x28]
lea eax, [ebp - 0x20c]
push eax
push ebx
push edi
push esi
call fcn.00402b90
add esp, 0x2c
test eax, eax
jne 0x40306d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x5cc], eax
call fcn.00402670
cmp dword [ebp - 0x5cc], 2
jne 0x403167
push dword [ebp + 0x30]
lea eax, [ebp - 0x108]
push dword [ebp - 0x5c0]
push dword [ebp - 0x5c4]
push dword [ebp - 0x5c8]
push dword [ebp - 0x5b8]
push ebx
push edi
push dword [ebp - 0x5bc]
push eax
push esi
push dword [ebp + 8]
call fcn.00403440
add esp, 0x2c
test al, al
je 0x403154
push dword [ebp + 0x28]
lea eax, [ebp - 0x20c]
push eax
push ebx
push edi
push esi
call fcn.00402b90
add esp, 0x14
test eax, eax
je 0x402ff8
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405755
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x108]
mov byte [ebp - 0x5bc], 0
mov ecx, esi
sub edx, esi
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x403091
push esi
push str.Connecting_to__s...
call fcn.00402e20
add esp, 8
cmp dword [ebp + 0x2c], 0xffffffff
je 0x402f64
push 0x2c
call fcn.004050ec
mov ecx, dword [ebp + 8]
push 0
push 0
mov byte [eax], cl
lea ecx, [ebp - 0x108]
mov dword [eax + 8], ecx
mov ecx, dword [ebp - 0x5b8]
mov dword [eax + 0x18], ecx
mov ecx, dword [ebp - 0x5c8]
push eax
mov dword [eax + 0x1c], ecx
mov ecx, dword [ebp - 0x5c4]
mov dword [eax + 0x20], ecx
mov ecx, dword [ebp - 0x5c0]
push 0x403670
mov dword [eax + 0x24], ecx
mov ecx, dword [ebp + 0x30]
push 0
push 0
mov dword [eax + 4], esi
mov byte [eax + 0xc], 0
mov dword [eax + 0x10], edi
mov dword [eax + 0x14], ebx
mov byte [eax + 0x28], cl
call fcn.004070bf
imul ecx, dword [ebp + 0x2c], 0x3e8
add esp, 0x1c
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x402fa8
push esi
push str._rTimeout_accessing__s._n
call fcn.00405eea
add eax, 0x40
push eax
call fcn.0040622f
add esp, 0xc
push 0x5b4
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405755
mov esp, ebp
pop ebp
ret
cmp byte [ebp + 0x30], 0
je 0x403190
push esi
push edi
push str._rCould_not_start__s_service_on__s:_n
call fcn.00405eea
add eax, 0x40
push eax
call fcn.0040622f
push dword [ebp - 0x5cc]
call fcn.00402d90
add esp, 0x14
push dword [ebp - 0x5b8]
push ebx
push esi
push dword [ebp + 8]
call fcn.004031c0
mov ecx, dword [ebp - 4]
add esp, 0x10
xor ecx, ebp
xor al, al
pop edi
pop esi
pop ebx
call fcn.00405755
mov esp, ebp
pop ebp
ret