Function at 0x1002ca60
Capabilities:
Get hostname
Initialize winsock library

Disassembly:
push 0xffffffffffffffff
push 0x100571b4
mov eax, dword fs:[0]
push eax
sub esp, 0x10c
mov eax, dword [0x1007fa04]
xor eax, esp
mov dword [esp + 0x108], eax
push ebx
push esi
push edi
mov eax, dword [0x1007fa04]
xor eax, esp
push eax
lea eax, [esp + 0x11c]
mov dword fs:[0], eax
mov al, byte [0x100839d5]
test al, al
mov edi, dword [esp + 0x12c]
mov ebx, 1
jne 0x1002cba1
mov eax, dword [0x100839ec]
push eax
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov cl, byte [0x100839d5]
test cl, cl
mov dword [esp + 0x124], 0
jne 0x1002cb8d
push 0x10083a00
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x1002cb32
test edi, edi
je 0x1002cb09
push str.WSAStartup
mov ecx, eax
mov ebx, 0x1400018f
mov edx, edi
call fcn.1002b2f0
add esp, 4
jmp 0x1002cb17
push eax
push str.INET_alloc_port:_WSAStartup_failed__error_code___d
call sym.fbclient.dll_gds__log
add esp, 8
lea ecx, [esp + 0x14]
mov dword [esp + 0x124], 0xffffffff
call fcn.10001130
xor eax, eax
jmp 0x1002cd2b
push 0
push 0x1002a160
call sym.fbclient.dll_gds__register_cleanup
call fcn.1004b8d0
cmp eax, 0x5a8
mov dword [0x100839c8], eax
jl 0x1002cb56
cmp eax, 0x8000
jle 0x1002cb60
mov dword [0x100839c8], 0x2000
push 0
push 4
push 0x1002ad50
push 0
call sym.fbclient.dll_fb_shutdown_callback
push 0
push 0
mov byte [0x100839d5], bl
call fcn.1002ca60
add esp, 8
or word [eax + 0x5a], 0x200
mov dword [0x100839dc], eax
lea ecx, [esp + 0x14]
mov dword [esp + 0x124], 0xffffffff
call fcn.10001130
mov ecx, dword [0x1007fa44]
push 0x10c
call fcn.10001e90
mov dword [esp + 0x10], eax
test eax, eax
mov dword [esp + 0x124], ebx
je 0x1002cbd7
mov edx, dword [0x100839c8]
lea ecx, [edx + edx]
push ecx
push 0
mov ecx, eax
call fcn.1002c020
mov esi, eax
jmp 0x1002cbd9
xor esi, esi
push 0
push esi
mov dword [esp + 0x12c], 0xffffffff
call fcn.1003bca0
add esp, 8
push 0x100
lea edx, [esp + 0x1c]
push edx
call dword [sym.imp.WS2_32.dll_gethostname]
lea eax, [esp + 0x18]
push eax
call fcn.1003c460
lea ecx, [esp + 0x1c]
push ecx
mov dword [esi + 0xd0], eax
call fcn.1003c460
mov edx, dword [esi + 0xd0]
add edx, 6
push edx
push str.tcp___s_
mov dword [esi + 0xd4], eax
lea eax, [esp + 0x28]
push 0x100
push eax
call dword [sym.imp.MSVCR80.dll__snprintf]
lea ecx, [esp + 0x30]
push ecx
call fcn.1003c460
mov cx, word [esp + 0x14c]
mov dword [esi + 0xcc], eax
mov eax, dword [0x100839dc]
mov dword [esi + 0x10], 0x1002a8a0
mov dword [esi + 0x14], fcn.1002ac70
mov dword [esi + 0x18], 0x1002a130
mov dword [esi + 0x1c], 0x1002a260
mov dword [esi + 0x30], 0x1002c850
mov dword [esi + 0x20], fcn.1002c480
mov dword [esi + 0x24], 0x1002a2c0
mov dword [esi + 0x28], 0x1002b910
mov dword [esi + 0x2c], 0x1002c2b0
mov dx, word [0x100839c8]
mov word [esi + 0x58], dx
mov dword [esi + 0x4c], eax
mov eax, dword [esi + 0x108]
mov word [esi + 0x5a], cx
mov ecx, dword [0x100839c8]
movzx edx, cx
push 0
push edx
add ecx, eax
lea eax, [esi + 0xa4]
mov edx, esi
call fcn.1002a2e0
mov ecx, dword [esi + 0x108]
push ebx
push 0
lea eax, [esi + 0x8c]
mov edx, esi
call fcn.1002a2e0
add esp, 0x2c
test edi, edi
je 0x1002cd29
test word [edi + 0x54], 0x100
jne 0x1002cd29
mov eax, dword [0x100839e0]
push eax
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push edi
mov ecx, esi
mov dword [esp + 0x128], 2
call fcn.1003bd20
lea ecx, [esp + 0x10]
mov dword [esp + 0x124], 0xffffffff
call fcn.10001130
mov eax, esi
mov ecx, dword [esp + 0x11c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x108]
xor ecx, esp
call fcn.10052756
add esp, 0x118
ret