Function at 0x57dba4
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Parse url
Resolve dns
Resolve function by parsing pe exports
Set socket configuration

Disassembly:
push edi
push esi
push ebp
push ebx
push ecx
mov eax, 0x12c
call fcn.00697340
mov ecx, dword [esp + 0x12c]
mov ebp, ecx
push 0x6c5af8
mov ecx, dword [0x7bd020]
call fcn.004feed4
mov word [esp + 0x12c], ax
lea eax, [esp + 0x12c]
push eax
mov ecx, dword [0x700c0c]
call fcn.004edfbc
mov ebx, eax
test ebx, ebx
je 0x57e4b9
push 0xa
lea ecx, [esp + 0x124]
call fcn.0050ab48
lea eax, [esp + 0x120]
push 1
push eax
mov ecx, ebx
call fcn.00502c2c
mov eax, dword [esp + 0x120]
cmp dword [eax], 2
jne 0x57dc23
mov ebx, 1
jmp 0x57dc25
xor ebx, ebx
lea ecx, [esp + 0x120]
call fcn.0050ac00
cmp ebx, 1
je 0x57e04c
xor esi, esi
xor edi, edi
mov eax, dword [esp + 0x144]
mov dword [eax], 0xffffffff
xor edx, edx
mov dword [esp + 0x100], edx
mov dword [esp + 0x104], edx
mov dword [esp + 0x108], edx
mov dword [esp + 0x10c], edx
mov eax, 2
mov word [esp + 0x100], ax
cmp ebx, 1
je 0x57dc83
movzx edi, word [esp + 0x14c]
push edi
call sub.WSOCK32.dll_htons
mov word [esp + 0x102], ax
lea ecx, [esp + 0x110]
call fcn.004e5750
cmp ebx, 1
je 0x57e03a
mov eax, dword [esp + 0x148]
push eax
lea ecx, [esp + 0x114]
call fcn.004e5464
lea ecx, [esp + 0x110]
call fcn.004e5460
push eax
call sub.WSOCK32.dll_inet_addr
cmp eax, 0xffffffff
jne 0x57dcf2
lea ecx, [esp + 0x110]
call fcn.004e5460
push eax
call sub.WSOCK32.dll_gethostbyname
test eax, eax
je 0x57e01c
mov eax, dword [eax + 0xc]
mov edx, dword [eax]
mov eax, dword [edx]
mov dword [esp + 0x104], eax
test ebx, ebx
je 0x57dfa4
push 0x6c5b10
mov ecx, dword [0x7bd020]
call fcn.004feed4
mov word [esp + 0xf8], ax
lea eax, [esp + 0xf8]
push eax
mov ecx, dword [0x700c0c]
call fcn.004edfbc
mov ebx, eax
test ebx, ebx
je 0x57dd76
push 0xa
lea ecx, [esp + 0xc4]
call fcn.0050ab48
lea eax, [esp + 0xc0]
push 1
push eax
mov ecx, ebx
call fcn.00502c2c
mov eax, dword [esp + 0xc0]
cmp dword [eax], 2
jne 0x57dd64
mov ebx, 1
jmp 0x57dd66
xor ebx, ebx
lea ecx, [esp + 0xc0]
call fcn.0050ac00
test ebx, ebx
jne 0x57dd7d
xor ebx, ebx
jmp 0x57de2f
mov ecx, dword [ebp + 0xe]
test ecx, ecx
je 0x57dd89
call fcn.004db4f8
mov dword [ebp + 0xe], 0
push 0x6c5b20
mov ecx, dword [0x7bd020]
call fcn.004feed4
mov word [esp + 0xe0], ax
lea eax, [esp + 0xe0]
push eax
mov ecx, dword [0x700c0c]
call fcn.004edfbc
mov ebx, eax
test ebx, ebx
je 0x57dff4
push 1
lea ecx, [esp + 0x94]
call fcn.0050ab48
lea eax, [esp + 0x90]
push 1
push eax
mov ecx, ebx
call fcn.00502c2c
mov ecx, dword [esp + 0x90]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x57de02
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x57dded
dec eax
inc eax
mov ecx, eax
call fcn.004dbe28
mov dword [ebp + 0xe], eax
mov esi, eax
mov edi, dword [esp + 0x90]
mov dl, byte [edi]
inc edi
mov byte [esi], dl
inc esi
test dl, dl
jne 0x57de16
mov ebx, dword [ebp + 0xe]
lea ecx, [esp + 0x90]
call fcn.0050ac00
push 0x6c5b10
mov ecx, dword [0x7bd020]
call fcn.004feed4
mov word [esp + 0xfc], ax
lea eax, [esp + 0xfc]
push eax
mov ecx, dword [0x700c0c]
call fcn.004edfbc
mov esi, eax
test esi, esi
je 0x57dea4
push 0xa
lea ecx, [esp + 0xd0]
call fcn.0050ab48
lea eax, [esp + 0xcc]
push 1
push eax
mov ecx, esi
call fcn.00502c2c
mov eax, dword [esp + 0xcc]
cmp dword [eax], 2
jne 0x57de92
mov esi, 1
jmp 0x57de94
xor esi, esi
lea ecx, [esp + 0xcc]
call fcn.0050ac00
test esi, esi
jne 0x57deab
xor esi, esi
jmp 0x57df5d
mov ecx, dword [ebp + 0x12]
test ecx, ecx
je 0x57deb7
call fcn.004db4f8
mov dword [ebp + 0x12], 0
push 0x6c5b30
mov ecx, dword [0x7bd020]
call fcn.004feed4
mov word [esp + 0xe4], ax
lea eax, [esp + 0xe4]
push eax
mov ecx, dword [0x700c0c]
call fcn.004edfbc
mov esi, eax
test esi, esi
je 0x57dfea
push 1
lea ecx, [esp + 0xa0]
call fcn.0050ab48
lea eax, [esp + 0x9c]
push 1
push eax
mov ecx, esi
call fcn.00502c2c
mov ecx, dword [esp + 0x9c]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x57df30
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x57df1b
dec eax
inc eax
mov ecx, eax
call fcn.004dbe28
mov dword [ebp + 0x12], eax
mov esi, eax
mov edi, dword [esp + 0x9c]
mov dl, byte [edi]
inc edi
mov byte [esi], dl
inc esi
test dl, dl
jne 0x57df44
mov esi, dword [ebp + 0x12]
lea ecx, [esp + 0x9c]
call fcn.0050ac00
lea edx, [esp + 0x100]
push esi
push ebx
movzx ebx, word [esp + 0x154]
push ebx
mov eax, dword [esp + 0x154]
push eax
push edx
mov esi, dword [esp + 0x158]
push esi
mov ecx, ebp
call fcn.0057e4c0
mov ebx, eax
lea ecx, [esp + 0x110]
call fcn.004e56ec
mov eax, ebx
add esp, 0x130
pop ebx
pop ebp
pop esi
pop edi
ret 0xc
push 6
push 1
push 2
call sub.WSOCK32.dll_socket
mov ebx, eax
lea eax, [esp + 0x100]
push 0x10
push eax
push ebx
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
je 0x57dffe
mov eax, dword [esp + 0x144]
mov dword [eax], ebx
lea ecx, [esp + 0x110]
call fcn.004e56ec
xor eax, eax
add esp, 0x130
pop ebx
pop ebp
pop esi
pop edi
ret 0xc
mov esi, 0x6c51ec
jmp 0x57df5d
mov ebx, 0x6c51ec
jmp 0x57de2f
lea ecx, [esp + 0x110]
call fcn.004e56ec
mov eax, 1
add esp, 0x130
pop ebx
pop ebp
pop esi
pop edi
ret 0xc
lea ecx, [esp + 0x110]
call fcn.004e56ec
mov eax, 1
add esp, 0x130
pop ebx
pop ebp
pop esi
pop edi
ret 0xc
push esi
lea ecx, [esp + 0x114]
call fcn.004e5464
jmp 0x57dcba
mov ecx, dword [ebp + 4]
test ecx, ecx
je 0x57e058
call fcn.004db4f8
mov dword [ebp + 4], 0
push 0x6c5b04
mov ecx, dword [0x7bd020]
call fcn.004feed4
mov word [esp + 0xe8], ax
lea eax, [esp + 0xe8]
push eax
mov ecx, dword [0x700c0c]
call fcn.004edfbc
mov esi, eax
test esi, esi
je 0x57e0fb
push 1
lea ecx, [esp + 0xac]
call fcn.0050ab48
lea eax, [esp + 0xa8]
push 1
push eax
mov ecx, esi
call fcn.00502c2c
mov ecx, dword [esp + 0xa8]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x57e0cd
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x57e0b8
dec eax
add eax, 0xa
mov ecx, eax
call fcn.004dbe28
mov dword [ebp + 4], eax
push dword [esp + 0xa8]
push str.http:___s
push eax
call fcn.006974c6
add esp, 0xc
lea ecx, [esp + 0xa8]
call fcn.0050ac00
mov esi, dword [ebp + 4]
mov dword [esp], 0x7f2058
mov dword [esp + 0xd8], 1
xor eax, eax
mov dword [esp + 4], eax
mov dword [esp + 8], eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 4], 0x3c
xor edx, edx
mov dword [esp + 8], edx
mov dword [esp + 0x14], edx
mov dword [esp + 0x20], edx
mov dword [esp + 0x28], edx
mov dword [esp + 0x30], edx
mov dword [esp + 0x38], edx
mov eax, 1
mov dword [esp + 0xc], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x3c], eax
lea edi, [esp + 0xf0]
lea ecx, [esp + 0xd8]
push edx
push ecx
push edi
push esi
call dword [sym.imp.WININET.dll_InternetCanonicalizeUrlA]
mov dword [esp + 0x44], 1
mov ecx, dword [esp + 0xd8]
inc ecx
call fcn.004dbe28
mov dword [esp + 0x40], eax
lea edx, [esp + 0xd8]
push 0
push edx
push eax
push esi
call dword [sym.imp.WININET.dll_InternetCanonicalizeUrlA]
mov esi, dword [esp + 0x40]
mov edx, dword [esp + 0xd8]
xor eax, eax
mov byte [edx + esi], al
mov ecx, dword [esp + 0x40]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x57e1fb
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x57e1e6
dec eax
lea esi, [esp + 4]
push esi
xor edx, edx
push edx
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetCrackUrlA]
test eax, eax
jne 0x57e219
mov dword [esp + 0x44], 0
jmp 0x57e225
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov byte [eax + edx], 0
cmp dword [esp + 0x44], 0
jne 0x57e247
mov dword [esp], 0x7f2058
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x57e240
call fcn.004db4f8
mov esi, 0x6c51ec
jmp 0x57e29e
mov edi, dword [esp + 0x14]
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x57e257
call fcn.004db4f8
mov ecx, edi
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x57e270
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x57e25b
dec eax
inc eax
mov ecx, eax
call fcn.004dbe28
mov dword [ebp + 8], eax
mov esi, eax
mov dl, byte [edi]
inc edi
mov byte [esi], dl
inc esi
test dl, dl
jne 0x57e27d
mov esi, dword [ebp + 8]
mov dword [esp], 0x7f2058
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x57e29e
call fcn.004db4f8
mov ecx, dword [ebp + 4]
test ecx, ecx
je 0x57e2aa
call fcn.004db4f8
mov dword [ebp + 4], 0
push 0x6c5b04
mov ecx, dword [0x7bd020]
call fcn.004feed4
mov word [esp + 0xec], ax
lea eax, [esp + 0xec]
push eax
mov ecx, dword [0x700c0c]
call fcn.004edfbc
mov edi, eax
test edi, edi
je 0x57e34d
push 1
lea ecx, [esp + 0xb8]
call fcn.0050ab48
lea eax, [esp + 0xb4]
push 1
push eax
mov ecx, edi
call fcn.00502c2c
mov ecx, dword [esp + 0xb4]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x57e31f
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x57e30a
dec eax
add eax, 0xa
mov ecx, eax
call fcn.004dbe28
mov dword [ebp + 4], eax
push dword [esp + 0xb4]
push str.http:___s
push eax
call fcn.006974c6
add esp, 0xc
lea ecx, [esp + 0xb4]
call fcn.0050ac00
mov edi, dword [ebp + 4]
mov dword [esp + 0x48], 0x7f2058
mov dword [esp + 0xdc], 1
xor eax, eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x4c], 0x3c
xor eax, eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x80], eax
mov edx, 1
mov dword [esp + 0x54], edx
mov dword [esp + 0x60], edx
mov dword [esp + 0x6c], edx
mov dword [esp + 0x74], edx
mov dword [esp + 0x7c], edx
mov dword [esp + 0x84], edx
lea edx, [esp + 0xf4]
lea ecx, [esp + 0xdc]
push eax
push ecx
push edx
push edi
call dword [sym.imp.WININET.dll_InternetCanonicalizeUrlA]
mov dword [esp + 0x8c], 1
mov ecx, dword [esp + 0xdc]
inc ecx
call fcn.004dbe28
mov dword [esp + 0x88], eax
lea edx, [esp + 0xdc]
push 0
push edx
push eax
push edi
call dword [sym.imp.WININET.dll_InternetCanonicalizeUrlA]
mov edi, dword [esp + 0x88]
mov edx, dword [esp + 0xdc]
xor eax, eax
mov byte [edx + edi], al
mov ecx, dword [esp + 0x88]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x57e466
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x57e451
dec eax
lea edi, [esp + 0x4c]
push edi
xor edx, edx
push edx
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetCrackUrlA]
test eax, eax
jne 0x57e487
mov dword [esp + 0x8c], 0
jmp 0x57e493
mov edx, dword [esp + 0x5c]
mov eax, dword [esp + 0x60]
mov byte [eax + edx], 0
movzx edi, word [esp + 0x64]
mov dword [esp + 0x48], 0x7f2058
mov ecx, dword [esp + 0x88]
test ecx, ecx
je 0x57dc3e
call fcn.004db4f8
jmp 0x57dc3e
xor ebx, ebx
jmp 0x57dc3a