Function at 0x493230
Capabilities:
Connect socket
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
mov eax, dword [0x63e758]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0x10]
push edi
mov dword [ebp - 0x28], eax
lea eax, [ebx + 1]
push 4
push eax
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x24], 0xffffffff
call fcn.00580d1f
mov edi, eax
push 0xc
push ebx
mov dword [ebp - 0x34], edi
call fcn.00580d1f
add esp, 0x10
mov dword [ebp - 0x20], eax
test eax, eax
je 0x49346d
test edi, edi
je 0x49346d
cmp ebx, 1
jb 0x49346d
mov edi, dword [sym.imp.WS2_32.dll_freeaddrinfo]
test ebx, ebx
je 0x4933a8
mov edx, dword [ebp - 0x28]
add eax, 8
mov ecx, edx
mov dword [ebp - 0x2c], ebx
sub ecx, esi
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x3c], ecx
mov ebx, esi
lea esp, [esp]
mov eax, dword [ebp + 0x18]
test edx, edx
je 0x4932ca
mov eax, dword [ecx + ebx]
mov esi, dword [ebx]
xor ecx, ecx
mov dword [ebp - 0x40], ecx
xorps xmm0, xmm0
movq qword [ebp - 0x48], xmm0
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x5c], ecx
movdqu xmmword [ebp - 0x58], xmm0
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x54], 1
test eax, eax
js 0x493309
push eax
push 0x5cbcc8
lea eax, [ebp - 0x14]
push 0xf
push eax
call fcn.00580ea1
add esp, 0x10
lea ecx, [ebp - 0x14]
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x5c]
push eax
push ecx
push esi
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x493324
push dword [ebp - 0x18]
call edi
jmp 0x493387
mov edi, dword [ebp - 0x18]
test edi, edi
je 0x493381
cmp dword [edi + 4], 0x17
mov esi, edi
jne 0x49334f
mov eax, dword [edi + 0x1c]
test eax, eax
je 0x49334f
mov esi, eax
lea esp, [esp]
cmp dword [esi + 4], 2
je 0x49334f
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x493340
mov esi, edi
push dword [esi + 0xc]
push dword [esi + 8]
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, dword [ebp - 0x1c]
mov dword [ecx - 8], eax
cmp eax, 0xffffffff
jne 0x493374
push edi
mov edi, dword [sym.imp.WS2_32.dll_freeaddrinfo]
call edi
jmp 0x493387
mov dword [ecx], edi
mov edi, dword [sym.imp.WS2_32.dll_freeaddrinfo]
mov dword [ecx - 4], esi
jmp 0x49338a
mov edi, dword [sym.imp.WS2_32.dll_freeaddrinfo]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x28]
add ecx, 0xc
add ebx, 4
mov dword [ebp - 0x1c], ecx
dec dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x3c]
jne 0x4932c0
mov ebx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x20]
xor edi, edi
test ebx, ebx
je 0x4933de
mov esi, eax
mov ecx, dword [esi]
mov eax, dword [esi + 4]
mov dword [ebp - 0x24], ecx
cmp ecx, 0xffffffff
je 0x4933d6
test eax, eax
je 0x4933d6
push dword [eax + 0x10]
push dword [eax + 0x18]
push ecx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jns 0x493454
inc edi
add esi, 0xc
cmp edi, ebx
jb 0x4933b0
push 0x2000b
push dword [ebp - 0x30]
call sym.wfreerdp.exe_freerdp_set_last_error
mov edx, dword [ebp - 0x20]
add esp, 8
test ebx, ebx
je 0x49342d
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
mov esi, edx
lea ecx, [ecx]
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x49340a
push eax
call edi
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
xorps xmm0, xmm0
movq qword [esi], xmm0
mov dword [esi + 8], 0
mov dword [esi], 0xffffffff
add esi, 0xc
dec ebx
jne 0x493400
push dword [ebp - 0x20]
call fcn.00580204
push dword [ebp - 0x34]
call fcn.00580204
mov eax, dword [ebp - 0x24]
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005802ce
mov esp, ebp
pop ebp
ret
cmp edi, ebx
jae 0x4933de
mov edx, dword [ebp - 0x20]
lea eax, [edi + edi*2]
mov ecx, dword [edx + eax*4]
mov dword [ebp - 0x24], ecx
mov dword [edx + eax*4], 0xffffffff
jmp 0x4933f1
push eax
call fcn.00580204
push edi
call fcn.00580204
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
or eax, 0xffffffff
pop edi
pop esi
pop ebx
call fcn.005802ce
mov esp, ebp
pop ebp
ret