Function at 0x429db0
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, 0x48
mov eax, dword [0x53de10]
xor eax, esp
mov dword [esp + 0x44], eax
push ebx
push ebp
mov ebp, dword [esp + 0x54]
movsx ecx, byte [ebp + 0x16d]
mov eax, dword [ebp + 0xe8]
mov edx, dword [ebp + 0xec]
shl ecx, 6
push esi
xor ebx, ebx
cmp dword [edx + 0x15c], ebx
lea esi, [ecx + eax + 0x24]
push edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], esi
mov dword [esp + 0x1c], ebx
je 0x429e7d
mov ecx, dword [ebp]
movzx eax, byte [ecx + 0x469]
cmp eax, ebx
jne 0x429e0c
xor eax, eax
jmp 0x429e17
lea eax, [eax + eax*2]
movzx eax, word [ecx + eax*2 + 8]
add eax, dword [ecx + 4]
movzx ecx, word [ebp + 0x20]
mov edx, dword [esi + 0x30]
push ecx
push eax
push str.CONNECT__s:_u_HTTP_1.0_r_nUser_agent:_libwebsockets_r_n
push edx
call fcn.004b913a
mov edi, eax
mov eax, dword [ebp + 0xec]
add eax, 0x80
add esp, 0x10
cmp byte [eax], bl
je 0x429e55
push eax
mov eax, dword [esi + 0x30]
add eax, edi
push str.Proxy_authorization:_basic__s_r_n
push eax
call fcn.004b913a
add esp, 0xc
add edi, eax
mov ecx, dword [esi + 0x30]
add ecx, edi
push 0x5329e0
push ecx
call fcn.004b913a
mov ebx, dword [ebp + 0xec]
movzx edx, word [ebx + 0x15c]
add esp, 8
add edi, eax
mov dword [esp + 0x1c], edi
jmp 0x429e9a
mov eax, dword [ebp]
movzx ecx, byte [eax + 0x469]
cmp ecx, ebx
je 0x429e96
lea ecx, [ecx + ecx*2]
movzx ebx, word [eax + ecx*2 + 8]
add ebx, dword [eax + 4]
movzx edx, word [ebp + 0x20]
push edx
call dword [sym.imp.WS2_32.dll_htons]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x28]
mov word [esp + 0x4a], ax
xor eax, eax
push edx
push eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
push ebx
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
je 0x429f09
push str.getaddrinfo_failed_n
lea esi, [edi + 1]
call fcn.004214d0
add esp, 4
jmp 0x429fec
mov edx, dword [esp + 0x20]
mov eax, edx
nop
test eax, eax
je 0x429f7c
mov ecx, dword [eax + 4]
sub ecx, 2
jne 0x429f22
mov edi, dword [eax + 0x18]
add edi, 4
test edi, edi
mov eax, dword [eax + 0x1c]
je 0x429f10
mov word [esp + 0x44], 2
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 [ebp + 0x13c], 0
jne 0x42a0c7
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
test eax, eax
mov dword [ebp + 0x13c], eax
jne 0x429f9d
push str.Unable_to_open_socket_n
lea esi, [eax + 2]
call fcn.004214d0
add esp, 4
jmp 0x429fec
test edi, edi
jne 0x429f29
push str.Couldnt_identify_address_n
lea esi, [edi + 1]
call fcn.004214d0
mov eax, dword [esp + 0x24]
add esp, 4
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
jmp 0x429fec
mov ebx, dword [ebp + 0xec]
mov edi, eax
call fcn.00422160
test eax, eax
je 0x429fc9
push str.Failed_to_set_wsi_socket_options_n
mov esi, 1
call fcn.004214d0
mov edx, dword [ebp + 0x13c]
add esp, 4
push edx
jmp 0x429fe6
mov ecx, dword [esp + 0x10]
mov eax, ebp
mov byte [ebp + 0x166], 0xa
call fcn.004203f0
test eax, eax
je 0x42a05d
mov eax, dword [ebp + 0x13c]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp]
mov ecx, dword [eax + 0xc74]
mov dword [eax + 0xc70], ecx
cmp byte [ebp + 0x166], 1
jne 0x42a026
mov ecx, dword [ebp + 0x110]
mov edx, dword [ebp + 0xec]
mov eax, dword [edx + 0x118]
mov edx, dword [eax + 4]
push 0
push 0
push ecx
push 1
push ebp
call edx
add esp, 0x14
cmp dword [ebp + 0x140], 0xffffffff
jne 0x42a228
push 0
mov eax, ebp
call fcn.00424370
push 0
push ebp
call dword [0x543a94]
add esp, 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x44]
xor ecx, esp
call fcn.004b883d
add esp, 0x48
ret
cmp dword [ebp + 0xfc], 0
jne 0x42a078
mov eax, dword [ebp + 0xec]
mov ecx, dword [eax + 0x118]
mov dword [ebp + 0xfc], ecx
mov eax, dword [ebp + 0x110]
mov edx, dword [ebp + 0xfc]
mov ecx, dword [edx + 4]
push 0
push 0
push eax
push 0x1d
push ebp
call ecx
push 0x14
mov ebx, 2
mov esi, ebp
call fcn.00420a20
mov edx, dword [ebp + 0xec]
mov edx, dword [edx + 0x114]
mov edi, dword [ebp + 0x13c]
add esp, 0x18
xor ecx, ecx
call fcn.00421690
test eax, eax
jl 0x42a228
mov esi, dword [esp + 0x14]
mov ecx, dword [ebp + 0x13c]
push 0x10
lea eax, [esp + 0x48]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
je 0x42a0ef
call edi
cmp eax, 0x2748
jne 0x42a130
call edi
cmp eax, 0x2735
je 0x42a212
call edi
cmp eax, 0x2734
je 0x42a212
call edi
cmp eax, 0x2733
je 0x42a212
call edi
cmp eax, 0x2726
je 0x42a212
call edi
cmp eax, 0x2748
jne 0x42a228
mov ecx, dword [ebp + 0xec]
cmp dword [ecx + 0x15c], 0
je 0x42a1b1
push 0x51
mov eax, ebp
call fcn.00424670
add esp, 4
test eax, eax
jne 0x42a228
mov edx, dword [ebp + 0xec]
mov ax, word [edx + 0x15c]
mov ecx, dword [esp + 0x1c]
push 0
mov word [ebp + 0x20], ax
mov edx, dword [esi + 0x30]
mov eax, dword [ebp + 0x13c]
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jl 0x42a228
push 0x14
mov ebx, 1
mov esi, ebp
call fcn.00420a20
add esp, 4
mov byte [ebp + 0x166], 0xb
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
mov ecx, dword [esp + 0x44]
xor ecx, esp
call fcn.004b883d
add esp, 0x48
ret
push 0x14
mov ebx, 8
mov esi, ebp
call fcn.00420a20
mov ecx, dword [ebp + 0x13c]
mov eax, 9
push 0
lea edx, [esp + 0x1c]
mov word [esp + 0x20], ax
mov word [esp + 0x22], ax
mov eax, dword [esp + 0x18]
push edx
push eax
mov byte [ebp + 0x166], 0xc
mov dword [esp + 0x24], ecx
call fcn.004237d0
add esp, 0x10
test eax, eax
jl 0x42a228
neg eax
sbb eax, eax
pop edi
not eax
pop esi
and eax, ebp
pop ebp
pop ebx
mov ecx, dword [esp + 0x44]
xor ecx, esp
call fcn.004b883d
add esp, 0x48
ret
push 2
push 0
mov eax, ebp
call fcn.00420700
add esp, 8
test eax, eax
je 0x42a19c
push 0
push ebp
call fcn.00420ae0
mov ecx, dword [esp + 0x5c]
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.004b883d
add esp, 0x48
ret