Function at 0x10017f20
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x17c
mov eax, dword [0x1009e024]
xor eax, esp
mov dword [esp + 0x178], eax
mov ecx, dword [esp + 0x188]
xor eax, eax
push ebx
push ebp
push esi
mov esi, dword [esp + 0x18c]
xor ebx, ebx
push edi
mov edi, dword [esp + 0x194]
mov dword [esp + 0x20], edi
mov ebp, dword [esi]
mov byte [ecx], al
mov dword [esp + 0x30], ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ebx
cmp byte [edi + esi + 0x4f2], al
je 0x10017f78
mov byte [ecx], 1
xor eax, eax
jmp 0x10018411
lea eax, [esp + 0x48]
push eax
call fcn.1001b5d0
mov ecx, dword [ebp + 0x640]
add esp, 4
mov dword [esp + 0x24], eax
mov edx, 1
mov dword [esp + 0x14], 0x493e0
movdqu xmm0, xmmword [eax]
xor eax, eax
test ecx, ecx
mov dword [esp + 0x10], eax
cmovg eax, edx
mov edx, dword [ebp + 0x644]
movdqu xmmword [esp + 0x38], xmm0
test edx, edx
jle 0x10017fbe
or eax, 2
dec eax
je 0x10017fcf
dec eax
je 0x10017fcb
dec eax
jne 0x10017fda
cmp ecx, edx
jl 0x10017fcf
mov eax, edx
jmp 0x10017fd1
mov eax, ecx
cdq
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], eax
movdqu xmm0, xmmword [ebp + 0xbd8]
mov ecx, dword [esp + 0x24]
sub esp, 0x10
mov eax, esp
sub esp, 0x10
movdqu xmmword [eax], xmm0
mov eax, esp
movdqu xmm0, xmmword [ecx]
movdqu xmmword [eax], xmm0
call fcn.1001b670
mov ecx, dword [esp + 0x34]
add esp, 0x20
sub ecx, eax
mov eax, ecx
mov dword [esp + 0x14], ecx
sbb dword [esp + 0x10], edx
mov edx, dword [esp + 0x10]
or eax, edx
je 0x100183fe
test edx, edx
jl 0x100183fe
jg 0x10018032
test ecx, ecx
jb 0x100183fe
mov eax, dword [esi + 4]
cmp eax, 1
jl 0x1001806e
cmp eax, 0x11
jge 0x1001806e
mov ebp, dword [esp + 0x30]
push ebp
push edi
push esi
call fcn.10018f40
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x10018067
cmp byte [ebp], bl
je 0x10018067
push ebp
push dword [esp + 0x24]
push esi
call fcn.10019040
add esp, 0xc
mov eax, edi
jmp 0x10018411
xor edi, edi
mov eax, edi
xor eax, 1
mov dword [esp + 0x24], eax
mov eax, dword [esi + edi*4 + 0x428]
cmp eax, 0xffffffff
je 0x100182bb
push 0
push 0
push eax
push 0xffffffffffffffff
push 0xffffffffffffffff
call fcn.10021680
add esp, 0x14
test eax, eax
jne 0x10018183
mov eax, dword [esi + 0x530]
sub esp, 0x10
movdqu xmm0, xmmword [esi + 0x518]
mov dword [esp + 0x3c], eax
xor ebx, ebx
mov eax, dword [esi + 0x534]
mov dword [esp + 0x44], eax
mov eax, esp
sub esp, 0x10
mov dword [esp + 0x3c], ebx
movdqu xmmword [eax], xmm0
mov eax, esp
movdqu xmm0, xmmword [esp + 0x58]
movdqu xmmword [eax], xmm0
call fcn.1001b670
mov ecx, dword [esp + 0x54]
add esp, 0x20
mov dword [esp + 0x28], eax
cmp edx, ecx
jl 0x10018115
mov eax, dword [esp + 0x2c]
jg 0x100180fc
cmp dword [esp + 0x28], eax
jb 0x10018115
push ecx
push eax
push str.After__I64dms_connect_time__move_on__n
push ebp
call fcn.100171e0
mov ebx, 0x274c
add esp, 0x10
mov dword [esp + 0x1c], ebx
test edi, edi
jne 0x100181d6
cmp byte [esi + 0x7e1], 0
jne 0x100181d6
movdqu xmm0, xmmword [esi + 0x518]
sub esp, 0x10
mov eax, esp
sub esp, 0x10
movdqu xmmword [eax], xmm0
mov eax, esp
movdqu xmm0, xmmword [esp + 0x58]
movdqu xmmword [eax], xmm0
call fcn.1001b670
mov dword [esp + 0x48], eax
mov ecx, edx
mov eax, dword [ebp + 0x64c]
add esp, 0x20
cdq
cmp ecx, edx
jl 0x100181d6
jg 0x1001816b
cmp dword [esp + 0x28], eax
jb 0x100181d6
push 1
push dword [esp + 0x24]
mov byte [esi + 0x7e1], 1
push esi
call fcn.10019500
add esp, 0xc
jmp 0x100181d6
cmp eax, 2
je 0x100181a8
cmp byte [esi + 0x50f], 0
jne 0x100181a8
test al, 4
je 0x100181d6
lea eax, [esp + 0x1c]
push eax
push dword [esi + edi*4 + 0x428]
call fcn.10019590
jmp 0x100181cf
lea eax, [esp + 0x1c]
push eax
push dword [esi + edi*4 + 0x428]
call fcn.10019590
add esp, 8
test al, al
jne 0x10018304
push str.Connection_failed_n
push ebp
call fcn.100171e0
mov ebx, dword [esp + 0x24]
add esp, 8
test ebx, ebx
je 0x100182bb
push ebx
mov dword [ebp + 0xd44], ebx
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [esi + edi*4 + 0x2bc]
test eax, eax
je 0x100182bb
push 0x2e
lea ecx, [esp + 0x5c]
push ecx
push eax
call fcn.1001bff0
push 0x100
lea eax, [esp + 0x98]
push eax
push ebx
call fcn.10038050
push eax
push dword [esi + 0x364]
lea eax, [esp + 0x78]
push eax
push str.connect_to__s_port__ld_failed:__s_n
push ebp
call fcn.100171e0
mov eax, dword [esi + edi*4 + 0x2bc]
add esp, 0x2c
cmp dword [eax + 0x1c], 0
jne 0x1001824b
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
jmp 0x1001825c
push 0
push 2
push dword [esp + 0x18]
push dword [esp + 0x20]
call fcn.10041d80
mov dword [esi + 0x530], eax
mov dword [esi + 0x534], edx
mov eax, dword [esi + edi*4 + 0x2bc]
test eax, eax
je 0x1001828d
mov eax, dword [eax + 0x1c]
test eax, eax
je 0x1001828d
mov ecx, dword [esi + edi*4 + 0x430]
cmp dword [eax + 4], ecx
je 0x1001828d
mov eax, dword [eax + 0x1c]
test eax, eax
jne 0x10018281
push edi
push dword [esp + 0x24]
mov dword [esi + edi*4 + 0x2bc], eax
push esi
call fcn.10019500
add esp, 0xc
cmp eax, 7
jne 0x100182b5
mov ecx, dword [esp + 0x24]
cmp dword [esi + ecx*4 + 0x428], 0xffffffff
jne 0x100182bb
mov dword [esp + 0x18], eax
jmp 0x100182bf
mov eax, dword [esp + 0x18]
inc edi
cmp edi, 2
jl 0x10018070
test eax, eax
je 0x10018411
push 1
push dword [esp + 0x24]
push esi
call fcn.10019500
add esp, 0xc
mov dword [esp + 0x18], eax
test eax, eax
je 0x10017f71
cmp byte [esi + 0x4fb], 0
je 0x10018395
mov edi, dword [esi + 0x32c]
jmp 0x100183bd
mov eax, dword [esi + edi*4 + 0x428]
mov ebx, dword [esp + 0x20]
mov ebp, dword [esp + 0x24]
mov dword [esi + ebx*4 + 0x420], eax
mov eax, dword [esi + edi*4 + 0x2bc]
mov dword [esi + 0x2b8], eax
mov dword [esi + edi*4 + 0x428], 0xffffffff
mov eax, dword [esi + 0x2b8]
cmp dword [eax + 4], 0x17
sete al
mov byte [esi + 0x4ff], al
mov eax, dword [esi + ebp*4 + 0x428]
cmp eax, 0xffffffff
je 0x10018366
push eax
push esi
call fcn.10017b90
add esp, 8
mov dword [esi + ebp*4 + 0x428], 0xffffffff
mov ebp, dword [esp + 0x30]
push ebp
push ebx
push esi
call fcn.10018f40
add esp, 0xc
test eax, eax
jne 0x10018411
cmp byte [ebp], al
je 0x10018411
push ebp
push ebx
push esi
call fcn.10019040
add esp, 0xc
xor eax, eax
jmp 0x10018411
cmp byte [esi + 0x4fa], 0
je 0x100183a6
mov edi, dword [esi + 0x34c]
jmp 0x100183bd
cmp byte [esi + 0x4f7], 0
je 0x100183b7
mov edi, dword [esi + 0x31c]
jmp 0x100183bd
mov edi, dword [esi + 0x304]
push 0x100
lea eax, [esp + 0x8c]
push eax
push ebx
call fcn.10038050
push eax
push dword [esi + 0x364]
push edi
push str.Failed_to_connect_to__s_port__ld:__s
push ebp
call fcn.10017100
mov eax, dword [esp + 0x38]
add esp, 0x20
cmp dword [ebp + 0xd44], 0x274c
mov ecx, 0x1c
cmove eax, ecx
jmp 0x10018411
push str.Connection_time_out
push ebp
call fcn.10017100
add esp, 8
mov eax, 0x1c
mov ecx, dword [esp + 0x188]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1004138c
add esp, 0x17c
ret