Function at 0x1002a680
Capabilities:
Connect socket

Disassembly:
push 0xffffffffffffffff
push 0x1008d70b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x3c
push ebx
push esi
mov esi, ecx
push edi
mov dword [esp + 0xc], esi
mov dword [esp + 0x1c], 0x100937fc
xor ebx, ebx
lea edi, [esi + 8]
cmp edi, ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x20], edi
je 0x1002a6c8
mov eax, dword [edi + 0x1c]
cmp eax, ebx
je 0x1002a6c8
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esp + 0x10], ebx
call fcn.10046cd0
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x24], eax
mov ecx, esi
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
call fcn.10008b40
test eax, eax
jne 0x1002a71a
cmp edi, ebx
je 0x1002a704
mov edi, dword [edi + 0x1c]
cmp edi, ebx
je 0x1002a704
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
add esp, 0x48
ret 0x14
push 0x2170
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [esp + 0x18], eax
cmp eax, ebx
mov byte [esp + 0x50], 1
je 0x1002a73e
mov ecx, eax
call fcn.10033940
jmp 0x1002a740
xor eax, eax
mov edx, dword [esi]
push ebp
push eax
mov ecx, esi
mov byte [esp + 0x58], 0
call dword [edx + 0xc]
mov ebp, eax
cmp ebp, ebx
mov dword [esp + 0x1c], ebp
je 0x1002a762
lea eax, [ebp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov ebx, 2
test ebp, ebp
mov byte [esp + 0x54], bl
je 0x1002aa7c
mov eax, dword [ebp + 0x2c]
mov ecx, dword [esp + 0x5c]
mov dword [ebp + 0x38], eax
mov dword [ebp + 0x3c], ebx
lea edx, [esp + 0x38]
mov dword [ebp + 0x78], ecx
mov ecx, dword [esp + 0x64]
push edx
call fcn.1003aa60
lea edi, [ebp + 0x44]
mov ecx, 5
mov esi, eax
mov eax, dword [esp + 0x68]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x60]
mov dword [ebp + 0x58], eax
push 0
mov dword [ebp + 0x84], 1
push 1
mov dword [ebp + 0x88], ebx
push ebx
mov dword [ebp + 0x2160], ecx
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x1002a818
lea edx, [esp + 0x64]
lea ecx, [esp + 0x38]
push edx
push str.F:SCVICELIBIceProviderIceSocketManager.cpp
mov dword [esp + 0x6c], 0x94b
call fcn.10038570
mov esi, eax
mov byte [esp + 0x54], 3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.socket
push 1
push esi
call fcn.100386d0
add esp, 0x10
lea ecx, [esp + 0x38]
mov byte [esp + 0x54], bl
call fcn.100385c0
jmp 0x1002a880
mov ecx, dword [esp + 0x64]
call fcn.1003a9d0
mov edi, dword [esp + 0x18]
push eax
push esi
mov ecx, edi
call fcn.10047940
test eax, eax
mov dword [esp + 0x5c], eax
je 0x1002a8a4
lea eax, [esp + 0x64]
lea ecx, [esp + 0x38]
push eax
push str.F:SCVICELIBIceProviderIceSocketManager.cpp
mov dword [esp + 0x6c], 0x950
call fcn.10038570
mov ecx, dword [esp + 0x5c]
mov byte [esp + 0x54], 4
push ecx
push str.bind
push 1
push eax
call fcn.100386d0
add esp, 0x10
mov byte [esp + 0x54], bl
lea ecx, [esp + 0x38]
call fcn.100385c0
push esi
mov ecx, edi
call fcn.10047840
mov esi, dword [ebp + 0x2c]
add ebp, 0x34
push ebp
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov ecx, dword [esp + 0x10]
push esi
mov dword [esp + 0x20], 0
call fcn.1002ac20
jmp 0x1002aa78
lea eax, [esp + 0x5c]
mov dword [ebp + 0x40], esi
mov dword [esp + 0x5c], 0x958
mov edx, dword [ebp + 0x2c]
push eax
push str.F:SCVICELIBIceProviderIceSocketManager.cpp
lea ecx, [esp + 0x40]
mov dword [esp + 0x68], edx
call fcn.10038570
mov ecx, dword [ebp + 0x58]
mov edx, dword [ebp + 0x40]
push ecx
mov ecx, dword [esp + 0x64]
push edx
push ecx
push str.connect
push 0
push eax
mov byte [esp + 0x6c], 5
call fcn.100386d0
add esp, 0x18
lea ecx, [esp + 0x38]
mov byte [esp + 0x54], bl
call fcn.100385c0
mov ecx, dword [esp + 0x10]
push ebp
push esi
call fcn.10029a60
test eax, eax
jne 0x1002a954
lea eax, [esp + 0x64]
mov dword [esp + 0x64], 0x95c
mov edx, dword [ebp + 0x2c]
push eax
push str.F:SCVICELIBIceProviderIceSocketManager.cpp
lea ecx, [esp + 0x40]
mov dword [esp + 0x70], edx
call fcn.10038570
mov ecx, dword [ebp + 0x40]
mov edx, dword [esp + 0x68]
push ecx
push edx
push str.ConnectClient
push 1
push eax
mov byte [esp + 0x68], 6
call fcn.100386d0
add esp, 0x14
mov byte [esp + 0x54], bl
lea ecx, [esp + 0x38]
jmp 0x1002a873
mov eax, dword [esp + 0x10]
push 0x33
push 0x83ee
mov ecx, dword [eax + 0x450]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_WSAAsyncSelect]
test eax, eax
je 0x1002a9bd
lea edx, [esp + 0x64]
lea ecx, [esp + 0x38]
push edx
push str.F:SCVICELIBIceProviderIceSocketManager.cpp
mov dword [esp + 0x6c], 0x964
call fcn.10038570
mov dword [esp + 0x68], eax
mov byte [esp + 0x54], 7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
mov eax, dword [esp + 0x6c]
push str.WSAAsyncSelect
push 1
push eax
call fcn.100386d0
add esp, 0x10
mov byte [esp + 0x54], bl
lea ecx, [esp + 0x38]
jmp 0x1002a873
mov edx, dword [esp + 0x68]
xor ecx, ecx
mov dword [esp + 0x28], ecx
push edx
mov dword [esp + 0x30], ecx
mov word [esp + 0x2c], bx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], ecx
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esp + 0x64]
mov word [esp + 0x2a], ax
call fcn.1003a9d0
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x28]
push 0x10
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x1002aa5d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x1002aa5d
lea ecx, [esp + 0x64]
mov dword [esp + 0x64], 0x972
push ecx
push str.F:SCVICELIBIceProviderIceSocketManager.cpp
lea ecx, [esp + 0x40]
call fcn.10038570
mov dword [esp + 0x68], eax
mov byte [esp + 0x54], 8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [esp + 0x68]
push eax
push esi
push 0x100a68d0
push 1
push edx
call fcn.100386d0
add esp, 0x14
mov byte [esp + 0x54], bl
lea ecx, [esp + 0x38]
jmp 0x1002a873
mov eax, dword [ebp + 0x2c]
mov ecx, dword [esp + 0x6c]
add ebp, 0x34
mov dword [esp + 0x14], 1
push ebp
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov edi, dword [esp + 0x24]
test edi, edi
pop ebp
je 0x1002aa8f
mov edi, dword [edi + 0x1c]
test edi, edi
je 0x1002aa8f
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x48
ret 0x14