Function at 0x57e044
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.006977b0
mov ecx, dword [esp + 0x12c]
mov ebp, ecx
push 0x6c5b80
mov ecx, dword [0x7bd020]
call fcn.004ff370
mov word [esp + 0x12c], ax
lea eax, [esp + 0x12c]
push eax
mov ecx, dword [0x700c0c]
call fcn.004ee44c
mov ebx, eax
test ebx, ebx
je 0x57e959
push 0xa
lea ecx, [esp + 0x124]
call fcn.0050afb4
lea eax, [esp + 0x120]
push 1
push eax
mov ecx, ebx
call fcn.00503088
mov eax, dword [esp + 0x120]
cmp dword [eax], 2
jne 0x57e0c3
mov ebx, 1
jmp 0x57e0c5
xor ebx, ebx
lea ecx, [esp + 0x120]
call fcn.0050b06c
cmp ebx, 1
je 0x57e4ec
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 0x57e123
movzx edi, word [esp + 0x14c]
push edi
call sub.WSOCK32.dll_htons
mov word [esp + 0x102], ax
lea ecx, [esp + 0x110]
call fcn.004e5be0
cmp ebx, 1
je 0x57e4da
mov eax, dword [esp + 0x148]
push eax
lea ecx, [esp + 0x114]
call fcn.004e58f4
lea ecx, [esp + 0x110]
call fcn.0057f960
push eax
call sub.WSOCK32.dll_inet_addr
cmp eax, 0xffffffff
jne 0x57e192
lea ecx, [esp + 0x110]
call fcn.0057f960
push eax
call sub.WSOCK32.dll_gethostbyname
test eax, eax
je 0x57e4bc
mov eax, dword [eax + 0xc]
mov edx, dword [eax]
mov eax, dword [edx]
mov dword [esp + 0x104], eax
test ebx, ebx
je 0x57e444
push 0x6c5b98
mov ecx, dword [0x7bd020]
call fcn.004ff370
mov word [esp + 0xf8], ax
lea eax, [esp + 0xf8]
push eax
mov ecx, dword [0x700c0c]
call fcn.004ee44c
mov ebx, eax
test ebx, ebx
je 0x57e216
push 0xa
lea ecx, [esp + 0xc4]
call fcn.0050afb4
lea eax, [esp + 0xc0]
push 1
push eax
mov ecx, ebx
call fcn.00503088
mov eax, dword [esp + 0xc0]
cmp dword [eax], 2
jne 0x57e204
mov ebx, 1
jmp 0x57e206
xor ebx, ebx
lea ecx, [esp + 0xc0]
call fcn.0050b06c
test ebx, ebx
jne 0x57e21d
xor ebx, ebx
jmp 0x57e2cf
mov ecx, dword [ebp + 0xe]
test ecx, ecx
je 0x57e229
call fcn.004db958
mov dword [ebp + 0xe], 0
push 0x6c5ba8
mov ecx, dword [0x7bd020]
call fcn.004ff370
mov word [esp + 0xe0], ax
lea eax, [esp + 0xe0]
push eax
mov ecx, dword [0x700c0c]
call fcn.004ee44c
mov ebx, eax
test ebx, ebx
je 0x57e494
push 1
lea ecx, [esp + 0x94]
call fcn.0050afb4
lea eax, [esp + 0x90]
push 1
push eax
mov ecx, ebx
call fcn.00503088
mov ecx, dword [esp + 0x90]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x57e2a2
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x57e28d
dec eax
inc eax
mov ecx, eax
call fcn.004dc288
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 0x57e2b6
mov ebx, dword [ebp + 0xe]
lea ecx, [esp + 0x90]
call fcn.0050b06c
push 0x6c5b98
mov ecx, dword [0x7bd020]
call fcn.004ff370
mov word [esp + 0xfc], ax
lea eax, [esp + 0xfc]
push eax
mov ecx, dword [0x700c0c]
call fcn.004ee44c
mov esi, eax
test esi, esi
je 0x57e344
push 0xa
lea ecx, [esp + 0xd0]
call fcn.0050afb4
lea eax, [esp + 0xcc]
push 1
push eax
mov ecx, esi
call fcn.00503088
mov eax, dword [esp + 0xcc]
cmp dword [eax], 2
jne 0x57e332
mov esi, 1
jmp 0x57e334
xor esi, esi
lea ecx, [esp + 0xcc]
call fcn.0050b06c
test esi, esi
jne 0x57e34b
xor esi, esi
jmp 0x57e3fd
mov ecx, dword [ebp + 0x12]
test ecx, ecx
je 0x57e357
call fcn.004db958
mov dword [ebp + 0x12], 0
push 0x6c5bb8
mov ecx, dword [0x7bd020]
call fcn.004ff370
mov word [esp + 0xe4], ax
lea eax, [esp + 0xe4]
push eax
mov ecx, dword [0x700c0c]
call fcn.004ee44c
mov esi, eax
test esi, esi
je 0x57e48a
push 1
lea ecx, [esp + 0xa0]
call fcn.0050afb4
lea eax, [esp + 0x9c]
push 1
push eax
mov ecx, esi
call fcn.00503088
mov ecx, dword [esp + 0x9c]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x57e3d0
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x57e3bb
dec eax
inc eax
mov ecx, eax
call fcn.004dc288
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 0x57e3e4
mov esi, dword [ebp + 0x12]
lea ecx, [esp + 0x9c]
call fcn.0050b06c
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.0057e960
mov ebx, eax
lea ecx, [esp + 0x110]
call fcn.004e5b7c
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 0x57e49e
mov eax, dword [esp + 0x144]
mov dword [eax], ebx
lea ecx, [esp + 0x110]
call fcn.004e5b7c
xor eax, eax
add esp, 0x130
pop ebx
pop ebp
pop esi
pop edi
ret 0xc
mov esi, 0x6c5270
jmp 0x57e3fd
mov ebx, 0x6c5270
jmp 0x57e2cf
lea ecx, [esp + 0x110]
call fcn.004e5b7c
mov eax, 1
add esp, 0x130
pop ebx
pop ebp
pop esi
pop edi
ret 0xc
lea ecx, [esp + 0x110]
call fcn.004e5b7c
mov eax, 1
add esp, 0x130
pop ebx
pop ebp
pop esi
pop edi
ret 0xc
push esi
lea ecx, [esp + 0x114]
call fcn.004e58f4
jmp 0x57e15a
mov ecx, dword [ebp + 4]
test ecx, ecx
je 0x57e4f8
call fcn.004db958
mov dword [ebp + 4], 0
push 0x6c5b8c
mov ecx, dword [0x7bd020]
call fcn.004ff370
mov word [esp + 0xe8], ax
lea eax, [esp + 0xe8]
push eax
mov ecx, dword [0x700c0c]
call fcn.004ee44c
mov esi, eax
test esi, esi
je 0x57e59b
push 1
lea ecx, [esp + 0xac]
call fcn.0050afb4
lea eax, [esp + 0xa8]
push 1
push eax
mov ecx, esi
call fcn.00503088
mov ecx, dword [esp + 0xa8]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x57e56d
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x57e558
dec eax
add eax, 0xa
mov ecx, eax
call fcn.004dc288
mov dword [ebp + 4], eax
push dword [esp + 0xa8]
push str.http:___s
push eax
call fcn.00697936
add esp, 0xc
lea ecx, [esp + 0xa8]
call fcn.0050b06c
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.004dc288
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 0x57e69b
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x57e686
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 0x57e6b9
mov dword [esp + 0x44], 0
jmp 0x57e6c5
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov byte [eax + edx], 0
cmp dword [esp + 0x44], 0
jne 0x57e6e7
mov dword [esp], 0x7f2058
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x57e6e0
call fcn.004db958
mov esi, 0x6c5270
jmp 0x57e73e
mov edi, dword [esp + 0x14]
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x57e6f7
call fcn.004db958
mov ecx, edi
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x57e710
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x57e6fb
dec eax
inc eax
mov ecx, eax
call fcn.004dc288
mov dword [ebp + 8], eax
mov esi, eax
mov dl, byte [edi]
inc edi
mov byte [esi], dl
inc esi
test dl, dl
jne 0x57e71d
mov esi, dword [ebp + 8]
mov dword [esp], 0x7f2058
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x57e73e
call fcn.004db958
mov ecx, dword [ebp + 4]
test ecx, ecx
je 0x57e74a
call fcn.004db958
mov dword [ebp + 4], 0
push 0x6c5b8c
mov ecx, dword [0x7bd020]
call fcn.004ff370
mov word [esp + 0xec], ax
lea eax, [esp + 0xec]
push eax
mov ecx, dword [0x700c0c]
call fcn.004ee44c
mov edi, eax
test edi, edi
je 0x57e7ed
push 1
lea ecx, [esp + 0xb8]
call fcn.0050afb4
lea eax, [esp + 0xb4]
push 1
push eax
mov ecx, edi
call fcn.00503088
mov ecx, dword [esp + 0xb4]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x57e7bf
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x57e7aa
dec eax
add eax, 0xa
mov ecx, eax
call fcn.004dc288
mov dword [ebp + 4], eax
push dword [esp + 0xb4]
push str.http:___s
push eax
call fcn.00697936
add esp, 0xc
lea ecx, [esp + 0xb4]
call fcn.0050b06c
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.004dc288
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 0x57e906
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x57e8f1
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 0x57e927
mov dword [esp + 0x8c], 0
jmp 0x57e933
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 0x57e0de
call fcn.004db958
jmp 0x57e0de
xor ebx, ebx
jmp 0x57e0da