Function at 0x4122d0
Capabilities:
Connect socket
Set socket configuration

Disassembly:
sub esp, 0x18
mov eax, dword [0x436090]
push ebp
mov ebp, dword [esp + 0x34]
push edi
mov edi, dword [esp + 0x24]
mov dword [esp + 0x1c], eax
mov dword [ebp], 0xffffffff
cmp dword [edi], 4
mov dword [esp + 8], 1
je 0x41231b
push str.ERROR:_mDNSPlatformTCPConnect___attempt_to_connect_to_an_IPv6_address:_operation_not_supported
call fcn.00410bc0
add esp, 4
pop edi
mov eax, 0xfffeffff
pop ebp
mov ecx, dword [esp + 0x14]
call fcn.0042373b
add esp, 0x18
ret
push esi
push 0x18
call fcn.00423687
mov esi, eax
add esp, 4
test esi, esi
jne 0x412343
mov edi, 0xfffefffd
pop esi
mov eax, edi
pop edi
pop ebp
mov ecx, dword [esp + 0x14]
call fcn.0042373b
add esp, 0x18
ret
mov edx, dword [esp + 0x34]
xor eax, eax
mov ecx, esi
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov dword [ecx + 0x10], eax
mov dword [ecx + 0x14], eax
mov eax, dword [esp + 0x38]
mov dword [esi + 8], edx
mov dx, word [esp + 0x2c]
mov dword [esi], 0xffffffff
mov dword [esi + 0xc], eax
mov eax, dword [edi + 4]
xor ecx, ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ecx
push ebx
mov dword [esp + 0x1c], ecx
push ecx
push 1
push 2
mov dword [esp + 0x2c], ecx
mov word [esp + 0x20], 2
mov word [esp + 0x22], dx
mov dword [esp + 0x24], eax
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov ebx, dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esi], eax
jne 0x4123c1
call ebx
test eax, eax
je 0x4124df
call ebx
mov edi, eax
test edi, edi
jne 0x41240e
mov edx, dword [esi]
lea ecx, [esp + 0x10]
push ecx
push 0x8004667e
push edx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
je 0x4123ea
call ebx
test eax, eax
je 0x4124df
call ebx
mov edi, eax
test edi, edi
jne 0x41240e
mov ecx, dword [esi]
push 0x10
lea eax, [esp + 0x18]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_connect]
mov edi, eax
test edi, edi
je 0x412446
call ebx
cmp eax, 0x2733
je 0x412446
mov edi, 0xfffeff04
mov eax, dword [esi + 0x10]
test eax, eax
je 0x41241c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x41242a
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
push esi
call fcn.00423699
add esp, 4
pop ebx
pop esi
mov eax, edi
pop edi
pop ebp
mov ecx, dword [esp + 0x14]
call fcn.0042373b
add esp, 0x18
ret
xor edx, edx
test edi, edi
push 0
sete dl
push 0
push 0
push 0
mov dword [esi + 4], edx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
test eax, eax
mov dword [esi + 0x10], eax
jne 0x412479
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
test eax, eax
je 0x4124df
call edi
mov edi, eax
test edi, edi
jne 0x41240e
mov eax, dword [esi + 0x10]
mov ecx, dword [esi]
push 0x31
push eax
push ecx
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
mov edi, eax
test edi, edi
jne 0x41240e
mov edx, dword [0x437994]
mov ecx, dword [0x437998]
mov eax, dword [esi]
inc ecx
mov dword [esi + 0x14], edx
mov dword [0x437998], ecx
mov dword [ebp], eax
mov eax, dword [esi + 4]
xor ecx, ecx
test eax, eax
sete cl
pop ebx
mov dword [0x437994], esi
pop esi
mov dword [0x43799c], 1
lea ecx, [ecx + ecx - 0x100fd]
mov edi, ecx
mov ecx, dword [esp + 0x1c]
mov eax, edi
pop edi
pop ebp
call fcn.0042373b
add esp, 0x18
ret
mov edi, 0xfffeffff
jmp 0x41240e