Function at 0x10127e30
Capabilities:
Connect socket

Disassembly:
sub esp, 0x1a0
mov eax, dword [0x101c3584]
xor eax, esp
mov dword [esp + 0x19c], eax
mov eax, dword [esp + 0x1a4]
mov edx, dword [ebx + 0x70]
push ebp
mov ebp, dword [ebx]
push esi
mov esi, ecx
mov ecx, dword [eax + 4]
mov dword [esp + 0x14], ecx
mov ecx, dword [eax + 0xc]
mov dword [esp + 0x1c], ecx
mov ecx, dword [eax + 0x10]
push edi
mov dword [esp + 0x14], esi
mov dword [esp + 0x1c], edx
mov dword [esp + 0x24], ecx
cmp ecx, 0x100
jbe 0x10127e83
mov ecx, 0x100
mov dword [esp + 0x24], ecx
mov edx, dword [eax + 0x18]
push ecx
push edx
lea eax, [esp + 0x30]
push eax
call fcn.1013fc90
mov dword [esi], 0
mov eax, dword [ebp + 0x17c]
add esp, 0xc
test eax, eax
je 0x10127eba
mov edx, dword [ebp + 0x180]
lea ecx, [esp + 0x18]
push ecx
push 0
push edx
call eax
add esp, 0xc
jmp 0x10127ecf
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
je 0x1012808a
mov edx, dword [esp + 0x18]
push 0x80
lea eax, [esp + 0x12c]
push eax
lea ecx, [esp + 0x34]
push ecx
push edx
call fcn.101295f0
add esp, 0x10
test eax, eax
je 0x10127f2c
lea eax, [esp + 0x128]
push eax
push 0x10179af4
lea esi, [ebp + 0x8694]
push 0x2e
push esi
call fcn.101289a0
lea edx, [ebx + 0x3c]
add esp, 0x10
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x10127f22
cmp dword [ebp + 0x308], 0
je 0x10127f40
push edi
mov esi, ebx
call fcn.10127d80
add esp, 4
push edi
call fcn.10127dc0
mov eax, dword [ebp + 0x174]
add esp, 4
test eax, eax
je 0x10127f6e
mov ecx, dword [ebp + 0x178]
push 0
push edi
push ecx
call eax
add esp, 0xc
mov dword [esp + 0x10], eax
test eax, eax
jne 0x10128083
mov edx, dword [esp + 0x18]
push edx
push edi
push ebx
call fcn.101278d0
add esp, 0xc
test eax, eax
jne 0x10128083
push 1
push edi
call fcn.100a7400
add esp, 8
cmp dword [ebx + 0x70], 1
jne 0x10127ff7
mov eax, dword [esp + 0x24]
push eax
lea ecx, [esp + 0x2c]
push ecx
push edi
call dword [sym.imp.WS2_32.dll_connect]
mov dword [esp + 0xc], eax
cmp eax, 0xffffffff
jne 0x10128015
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov dword [esp + 0x10], esi
cmp esi, 0xb
je 0x10128001
cmp esi, 0x2732
jle 0x10127fd1
cmp esi, 0x2734
jle 0x10128001
push esi
push ebx
call fcn.10134b00
push eax
lea edx, [esp + 0x134]
push edx
push str.Failed_to_connect_to__s:__s
push ebp
call fcn.101274f0
add esp, 0x18
mov dword [ebp + 0x8554], esi
jmp 0x10128023
mov dword [esp + 0xc], 0
jmp 0x10128023
mov eax, dword [esp + 0x1b4]
push ebx
call fcn.10127860
add esp, 4
mov dword [esp + 0xc], eax
cmp eax, 1
jne 0x10128023
cmp dword [ebp + 0x508], 2
je 0x10128050
push edi
lea esi, [esp + 0x14]
call fcn.10127b90
mov ecx, dword [esp + 0x10]
add esp, 4
test ecx, ecx
jne 0x1012806a
test eax, eax
je 0x1012806f
mov eax, dword [esp + 0x14]
push edi
push ebx
mov dword [eax], 1
call fcn.10127c50
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x19c]
xor ecx, esp
call fcn.1013d581
add esp, 0x1a0
ret
cmp ecx, 1
je 0x10128083
mov eax, dword [esp + 0x10]
push eax
push ebx
mov dword [ebp + 0x8554], eax
call fcn.10134b00
add esp, 8
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [esp + 0x1a8]
pop edi
pop esi
pop ebp
xor ecx, esp
or eax, 0xffffffff
call fcn.1013d581
add esp, 0x1a0
ret