Function at 0x424590
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Resolve dns
Send data
Send data on socket
Send http request

Disassembly:
sub esp, 0x58
mov eax, dword [0x70635c]
xor eax, esp
mov dword [esp + 0x54], eax
push ebx
push ebp
push esi
mov esi, dword [esp + 0x68]
movsx eax, byte [esi + 0x12d]
mov ebx, dword [esi + 0xc8]
shl eax, 6
cmp dword [ebx + 0x310], 0
push edi
lea edi, [eax + ebx + 0x1c]
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], 0
je 0x424647
mov ecx, dword [esi]
movzx edx, word [ecx + 0xc7a]
push edx
push 0x50
push esi
call fcn.00421920
add esp, 8
push eax
mov eax, dword [edi + 0x30]
mov edi, dword [sym.imp.MSVCR90.dll_sprintf]
push str.CONNECT__s:_u_HTTP_1.0_r_nUser_agent:_libwebsockets_r_n
push eax
call edi
mov ebp, eax
lea eax, [ebx + 0x1f8]
add esp, 0x10
cmp byte [eax], 0
je 0x42461d
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x30]
push eax
add edx, ebp
push str.Proxy_authorization:_basic__s_r_n
push edx
call edi
add esp, 0xc
add ebp, eax
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x30]
add ecx, ebp
push 0x61c978
push ecx
call edi
movzx edx, word [ebx + 0x310]
add esp, 8
add ebp, eax
mov dword [esp + 0x14], ebp
lea ebp, [ebx + 0x178]
push edx
jmp 0x42465e
push 0x50
push esi
call fcn.00421920
mov ebp, eax
mov eax, dword [esi]
movzx ecx, word [eax + 0xc7a]
add esp, 8
push ecx
call dword [sym.imp.WS2_32.dll_htons]
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x28]
mov word [esp + 0x4a], ax
xor eax, eax
push ecx
push eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
push ebp
xor edi, edi
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], 1
mov dword [esp + 0x34], 2
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
jne 0x424784
mov edx, dword [esp + 0x18]
mov eax, edx
test eax, eax
je 0x42472f
mov ecx, dword [eax + 4]
sub ecx, 2
jne 0x4246d3
mov edi, dword [eax + 0x18]
add edi, 4
mov eax, dword [eax + 0x1c]
test edi, edi
je 0x4246c1
mov eax, 2
mov word [esp + 0x44], ax
mov ecx, dword [edi]
xor eax, eax
push edx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp dword [esi + 0x104], 0
jne 0x424888
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0x104], eax
test eax, eax
jne 0x42473c
push str.Unable_to_open_socket_n
push 2
call fcn.0041dc50
add esp, 8
jmp 0x424784
test edi, edi
jne 0x4246da
push edx
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
jmp 0x424784
push eax
push ebx
call fcn.0041e9f0
add esp, 8
test eax, eax
je 0x424762
push str.Failed_to_set_wsi_socket_options_n
push 1
call fcn.0041dc50
mov edx, dword [esi + 0x104]
add esp, 8
push edx
jmp 0x42477e
push esi
push ebx
mov byte [esi + 0x126], 8
call fcn.0041d4c0
add esp, 8
test eax, eax
je 0x4247b8
mov eax, dword [esi + 0x104]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [esi]
mov ecx, dword [eax + 0xc58]
push esi
mov dword [eax + 0xc54], ecx
call fcn.004216d0
push 0
push esi
call fcn.0041f490
add esp, 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.00606c9e
add esp, 0x58
ret
push 0x14
push 2
push esi
call fcn.0041d930
xor eax, eax
mov dword [esp + 0x60], eax
mov edx, 2
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov word [esp + 0x60], dx
mov eax, dword [ebx + 0x15c]
add esp, 0xc
test eax, eax
je 0x424888
push 0x10
lea ecx, [esp + 0x58]
push ecx
push eax
push ebx
call fcn.0041da50
add esp, 0x10
test eax, eax
jge 0x42483a
mov edx, dword [ebx + 0x15c]
push edx
push str.Unable_to_find_interface__s_n
push 1
call fcn.0041dc50
add esp, 0xc
push 0
push esi
call fcn.0041df40
add esp, 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.00606c9e
add esp, 0x58
ret
mov ecx, dword [esi + 0x104]
push 0x10
lea eax, [esp + 0x58]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jge 0x424888
mov edx, dword [ebx + 0x15c]
push edx
push str.Error_binding_to_interface__s
push 1
call fcn.0041dc50
add esp, 0xc
push 0
push esi
call fcn.0041df40
add esp, 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.00606c9e
add esp, 0x58
ret
mov ecx, dword [esi + 0x104]
push 0x10
lea eax, [esp + 0x48]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_connect]
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0xffffffff
je 0x4248b0
call edi
cmp eax, 0x2748
jne 0x4248f1
call edi
cmp eax, 0x2735
je 0x4249c3
call edi
cmp eax, 0x2734
je 0x4249c3
call edi
cmp eax, 0x2733
je 0x4249c3
call edi
cmp eax, 0x2726
je 0x4249c3
call edi
cmp eax, 0x2748
jne 0x4249d4
cmp dword [ebx + 0x310], 0
je 0x424971
lea edx, [ebx + 0x178]
push edx
push 0x50
push esi
call fcn.004219b0
add esp, 0xc
test eax, eax
jne 0x4249d4
mov eax, dword [esi]
mov cx, word [ebx + 0x310]
mov edx, dword [esp + 0x14]
mov word [eax + 0xc7a], cx
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x30]
push 0
push edx
mov edx, dword [esi + 0x104]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jl 0x4249d4
push 0x14
push 1
push esi
call fcn.0041d930
add esp, 0xc
mov byte [esi + 0x126], 9
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.00606c9e
add esp, 0x58
ret
push 0x14
push 8
push esi
call fcn.0041d930
mov eax, dword [esi + 0x104]
lea edx, [esp + 0x28]
push edx
mov ecx, 9
push ebx
mov byte [esi + 0x126], 0xa
mov dword [esp + 0x30], eax
mov word [esp + 0x36], cx
call fcn.0041c4c0
add esp, 0x14
test eax, eax
jl 0x4249d4
neg eax
sbb eax, eax
pop edi
not eax
and eax, esi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.00606c9e
add esp, 0x58
ret
push 2
push 0
push esi
call fcn.0041d760
add esp, 0xc
test eax, eax
je 0x42495c
push 0
push esi
call fcn.0041df40
mov ecx, dword [esp + 0x6c]
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00606c9e
add esp, 0x58
ret