Function at 0x41d540
Capabilities:
Connect socket

Disassembly:
sub esp, 0xdc
mov eax, dword [0x5c6a38]
xor eax, esp
mov dword [esp + 0xd8], eax
mov eax, dword [esp + 0xe4]
push ebp
mov ebp, dword [esp + 0xe4]
mov edx, dword [ebp]
mov dword [esp + 0xc], ecx
mov dword [ecx], 0xffffffff
lea ecx, [esp + 0x14]
push ecx
mov dword [esp + 0x14], edx
lea edx, [esp + 0x20]
push edx
push eax
push ebp
mov dword [esp + 0x18], 0
call fcn.0041d3b0
add esp, 0x10
mov dword [esp + 4], eax
test eax, eax
je 0x41d5b0
xor eax, eax
pop ebp
mov ecx, dword [esp + 0xd8]
xor ecx, esp
call fcn.00543417
add esp, 0xdc
ret
push ebx
push esi
push edi
lea ebx, [esp + 0x24]
lea edi, [esp + 0xb8]
lea esi, [esp + 0x38]
call fcn.0041d020
test eax, eax
jne 0x41d5fe
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebp
call fcn.004203d0
push eax
mov eax, dword [esp + 0x28]
push esi
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push eax
call fcn.0041abc0
mov ecx, dword [esp + 0x38]
push ecx
push ebp
call fcn.0041d350
add esp, 0x20
jmp 0x41d7d9
mov esi, dword [esp + 0x1c]
lea edx, [esp + 0xb8]
push edx
push str.__Trying__s..._n
push esi
call fcn.0041ab30
mov edi, dword [esp + 0x2c]
add esp, 0xc
cmp dword [esp + 0x28], 2
jne 0x41d62e
mov ebx, 1
cmp dword [esp + 0x2c], ebx
je 0x41d632
xor ebx, ebx
jmp 0x41d645
cmp dword [esi + 0x3f4], 0
je 0x41d645
push edi
push ebp
call fcn.0041d200
add esp, 8
push edi
call fcn.0041d260
add esp, 4
test ebx, ebx
je 0x41d660
cmp dword [esi + 0x538], 0
je 0x41d660
call fcn.0041c970
mov eax, dword [esi + 0x1b0]
test eax, eax
je 0x41d686
mov ecx, dword [esi + 0x1b4]
push 0
push edi
push ecx
call eax
add esp, 0xc
cmp eax, 2
jne 0x41d6c8
mov dword [esp + 0x14], 1
cmp dword [esp + 0x28], 2
jne 0x41d6e0
lea edx, [esp + 0x38]
push edx
call fcn.0040a170
push eax
mov eax, dword [esp + 0x30]
push eax
push edi
push ebp
call fcn.0041cb20
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x41d6e4
push edi
push ebp
call fcn.0041d350
add esp, 8
cmp ebx, 1
jne 0x41d7cf
lea eax, [ebx + 6]
jmp 0x41d7db
test eax, eax
je 0x41d686
push edi
push ebp
call fcn.0041d350
add esp, 8
mov eax, 0x2a
jmp 0x41d7db
mov ebx, dword [esp + 0x10]
push 1
push edi
call fcn.0043d520
add esp, 8
call fcn.0041a580
cmp dword [ebp + 0x430], 1
mov dword [ebp + 0x428], eax
mov dword [ebp + 0x42c], edx
jle 0x41d720
mov ecx, dword [ebp + 0x43c]
mov edx, dword [ebp + 0x438]
push ecx
push edx
push esi
call fcn.00418d30
add esp, 0xc
cmp dword [esp + 0x14], 0
jne 0x41d7d3
cmp dword [ebp + 0x8c], 1
jne 0x41d7d3
cmp dword [ebp + 0x410], 0
jne 0x41d757
mov eax, dword [esp + 0x34]
push eax
lea ecx, [esp + 0x3c]
push ecx
push edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x41d7c5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp ebx, 0xb
je 0x41d7af
cmp ebx, 0x2732
jle 0x41d774
cmp ebx, 0x2734
jle 0x41d7af
push ebx
push ebp
call fcn.004203d0
push eax
lea edx, [esp + 0xc4]
push edx
push str.Immediate_connect_fail_for__s:__s_n
push esi
call fcn.0041ab30
push edi
push ebp
mov dword [esi + 0x473c], ebx
call fcn.0041d350
mov dword [esp + 0x30], 7
mov ebx, dword [esp + 0x30]
add esp, 0x20
mov eax, ebx
jmp 0x41d7db
mov eax, dword [esp + 0x18]
mov dword [esp + 0x10], 0
mov ebx, dword [esp + 0x10]
mov dword [eax], edi
mov eax, ebx
jmp 0x41d7db
test ebx, ebx
jne 0x41d7cf
mov eax, dword [esp + 0x18]
mov dword [eax], edi
mov eax, ebx
jmp 0x41d7db
mov ecx, dword [esp + 0x18]
mov dword [ecx], edi
xor eax, eax
mov ecx, dword [esp + 0xe8]
pop edi
pop esi
pop ebx
pop ebp
xor ecx, esp
call fcn.00543417
add esp, 0xdc
ret