Function at 0x405924
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff004
push eax
add esp, 0xffffff54
test dword [esp], ebx
push ebx
push esi
push edi
lea ebx, [ebp - 0x50]
lea esi, [ebp - 0xa0]
mov eax, 0x5b2bf4
call fcn.005a26b0
mov dword [ebp - 0x200], 1
lea edx, [ebp + 0xc]
lea eax, [ebp + 0xc]
call fcn.005b04d0
inc dword [ebp - 0x200]
mov word [ebp - 0x20c], 0xc
mov word [ebp - 0x20c], 0x18
mov edx, dword [ebp + 0xc]
push edx
lea ecx, [ebp - 0x28]
push ecx
call fcn.0040cc80
add esp, 8
inc dword [ebp - 0x200]
mov word [ebp - 0x20c], 0xc
push 0x5b2166
call fcn.005a2354
pop ecx
push eax
push 0
push 0x5b2166
lea ecx, [ebp - 0x28]
push ecx
call fcn.0040d3e8
add esp, 0x10
cmp eax, 0xffffffff
je 0x4059e5
push 0x5b2169
call fcn.005a2354
pop ecx
push eax
push 0
push 0x5b2169
lea eax, [ebp - 0x28]
push eax
call fcn.0040d3e8
add esp, 0x10
cmp eax, 0xffffffff
jne 0x405ad0
mov word [ebp - 0x20c], 0x24
mov edx, 0x5b216e
lea eax, [ebp - 0x11c]
call fcn.005b0490
inc dword [ebp - 0x200]
lea edx, [ebp - 0x11c]
mov eax, dword [ebp + 8]
call fcn.005b05e4
mov eax, dword [ebp + 8]
mov edx, 2
mov word [ebp - 0x20c], 0x30
push eax
lea eax, [ebp - 0x11c]
dec dword [ebp - 0x200]
call fcn.005b05bc
dec dword [ebp - 0x200]
cmp dword [ebp - 4], 0x10
jb 0x405a63
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x220], ecx
mov eax, dword [ebp - 0x220]
mov dword [ebp - 0x224], eax
mov edx, dword [ebp - 0x224]
push edx
call fcn.00597660
pop ecx
mov ecx, 0xf
mov dword [ebp - 4], ecx
mov byte [ebp - 0x225], 0
cmp dword [ebp - 4], 0x10
jb 0x405a7d
mov eax, dword [ebp - 0x18]
jmp 0x405a80
lea eax, [ebp - 0x18]
xor edx, edx
mov dword [ebp - 8], edx
add eax, edx
mov dword [ebp - 0x22c], eax
mov edx, 2
mov eax, dword [ebp - 0x22c]
mov cl, byte [ebp - 0x225]
mov byte [eax], cl
lea eax, [ebp + 0xc]
dec dword [ebp - 0x200]
call fcn.005b05bc
pop eax
mov word [ebp - 0x20c], 0x24
inc dword [ebp - 0x200]
mov edx, dword [ebp - 0x21c]
mov dword fs:[0], edx
jmp 0x40cc79
mov word [ebp - 0x20c], 0x3c
lea ecx, [ebp - 0x234]
push ecx
call fcn.00403e6c
pop ecx
lea ecx, [ebp - 0x234]
push ecx
lea eax, [ebx + 8]
push eax
call fcn.00403e94
add esp, 8
mov edx, 0xf
mov dword [ebx + 0x24], edx
mov byte [ebp - 0x235], 0
cmp dword [ebx + 0x24], 0x10
jb 0x405b13
mov ecx, dword [ebx + 0x10]
jmp 0x405b16
lea ecx, [ebx + 0x10]
xor eax, eax
mov dword [ebx + 0x20], eax
add ecx, eax
mov dword [ebp - 0x23c], ecx
mov edx, dword [ebp - 0x23c]
mov cl, byte [ebp - 0x235]
mov byte [edx], cl
push 0x5b216f
call fcn.005a2354
pop ecx
mov dword [ebp - 0x240], eax
mov ecx, 0x5b216f
test ecx, ecx
je 0x405b7a
cmp dword [ebx + 0x24], 0x10
mov eax, 0x5b216f
jb 0x405b5b
mov edx, dword [ebx + 0x10]
jmp 0x405b5e
lea edx, [ebx + 0x10]
cmp eax, edx
jb 0x405b7a
cmp dword [ebx + 0x24], 0x10
jb 0x405b6d
mov eax, dword [ebx + 0x10]
jmp 0x405b70
lea eax, [ebx + 0x10]
add eax, dword [ebx + 0x20]
cmp eax, 0x5b216f
ja 0x405b7e
xor edx, edx
jmp 0x405b80
mov dl, 1
test dl, dl
je 0x405ff9
cmp dword [ebx + 0x24], 0x10
mov eax, 0x5b216f
jb 0x405b98
mov ecx, dword [ebx + 0x10]
jmp 0x405b9b
lea ecx, [ebx + 0x10]
sub eax, ecx
mov dword [ebp - 0x244], eax
mov eax, dword [ebx + 0x20]
cmp eax, dword [ebp - 0x244]
jae 0x405bb5
push ebx
call fcn.0059da88
pop ecx
mov edx, dword [ebx + 0x20]
sub edx, dword [ebp - 0x244]
mov dword [ebp - 0x248], edx
mov ecx, dword [ebp - 0x240]
cmp ecx, dword [ebp - 0x248]
jae 0x405bde
mov eax, dword [ebp - 0x240]
mov dword [ebp - 0x248], eax
cmp ebx, ebx
jne 0x405de4
mov dword [ebp - 0x24c], 0xffffffff
mov edx, dword [ebp - 0x244]
add edx, dword [ebp - 0x248]
mov dword [ebp - 0x250], edx
mov ecx, dword [ebx + 0x20]
cmp ecx, dword [ebp - 0x250]
jae 0x405c14
push ebx
call fcn.0059da88
pop ecx
mov eax, dword [ebx + 0x20]
sub eax, dword [ebp - 0x250]
cmp eax, dword [ebp - 0x24c]
jae 0x405c34
mov edx, dword [ebx + 0x20]
sub edx, dword [ebp - 0x250]
mov dword [ebp - 0x24c], edx
cmp dword [ebp - 0x24c], 0
jbe 0x405cfc
mov ecx, dword [ebx + 0x20]
sub ecx, dword [ebp - 0x250]
sub ecx, dword [ebp - 0x24c]
mov dword [ebp - 0x254], ecx
cmp dword [ebx + 0x24], 0x10
jb 0x405c61
mov eax, dword [ebx + 0x10]
jmp 0x405c64
lea eax, [ebx + 0x10]
add eax, dword [ebp - 0x250]
add eax, dword [ebp - 0x24c]
mov dword [ebp - 0x258], eax
cmp dword [ebx + 0x24], 0x10
jb 0x405c81
mov edx, dword [ebx + 0x10]
jmp 0x405c84
lea edx, [ebx + 0x10]
add edx, dword [ebp - 0x250]
mov dword [ebp - 0x25c], edx
mov eax, dword [ebp - 0x254]
push eax
mov ecx, dword [ebp - 0x258]
push ecx
mov ecx, dword [ebp - 0x25c]
push ecx
call fcn.005a2121
add esp, 0xc
mov eax, dword [ebx + 0x20]
sub eax, dword [ebp - 0x24c]
mov dword [ebp - 0x260], eax
mov edx, dword [ebp - 0x260]
mov dword [ebp - 0x264], edx
mov byte [ebp - 0x265], 0
cmp dword [ebx + 0x24], 0x10
jb 0x405cda
mov ecx, dword [ebx + 0x10]
jmp 0x405cdd
lea ecx, [ebx + 0x10]
mov eax, dword [ebp - 0x264]
mov dword [ebx + 0x20], eax
add ecx, eax
mov dword [ebp - 0x26c], ecx
mov edx, dword [ebp - 0x26c]
mov cl, byte [ebp - 0x265]
mov byte [edx], cl
mov ecx, dword [ebp - 0x244]
mov dword [ebp - 0x270], ecx
cmp dword [ebx + 0x20], 0
jae 0x405d15
push ebx
call fcn.0059da88
pop ecx
mov eax, dword [ebx + 0x20]
cmp eax, dword [ebp - 0x270]
jae 0x405d29
mov edx, dword [ebx + 0x20]
mov dword [ebp - 0x270], edx
cmp dword [ebp - 0x270], 0
jbe 0x4061c5
mov ecx, dword [ebx + 0x20]
sub ecx, dword [ebp - 0x270]
mov dword [ebp - 0x274], ecx
cmp dword [ebx + 0x24], 0x10
jb 0x405d50
mov eax, dword [ebx + 0x10]
jmp 0x405d53
lea eax, [ebx + 0x10]
add eax, dword [ebp - 0x270]
mov dword [ebp - 0x278], eax
cmp dword [ebx + 0x24], 0x10
jb 0x405d6a
mov edx, dword [ebx + 0x10]
jmp 0x405d6d
lea edx, [ebx + 0x10]
mov dword [ebp - 0x27c], edx
mov eax, dword [ebp - 0x274]
push eax
mov ecx, dword [ebp - 0x278]
push ecx
mov ecx, dword [ebp - 0x27c]
push ecx
call fcn.005a2121
add esp, 0xc
mov eax, dword [ebx + 0x20]
sub eax, dword [ebp - 0x270]
mov dword [ebp - 0x280], eax
mov edx, dword [ebp - 0x280]
mov dword [ebp - 0x284], edx
mov byte [ebp - 0x285], 0
cmp dword [ebx + 0x24], 0x10
jb 0x405dbd
mov ecx, dword [ebx + 0x10]
jmp 0x405dc0
lea ecx, [ebx + 0x10]
mov eax, dword [ebp - 0x284]
mov dword [ebx + 0x20], eax
add ecx, eax
mov dword [ebp - 0x28c], ecx
mov edx, dword [ebp - 0x28c]
mov cl, byte [ebp - 0x285]
mov byte [edx], cl
jmp 0x4061c5
mov ecx, dword [ebp - 0x248]
mov dword [ebp - 0x290], ecx
lea eax, [ebx + 8]
push eax
call fcn.004040bc
pop ecx
mov dword [ebp - 0x294], eax
cmp dword [ebp - 0x294], 1
ja 0x405e10
mov edx, 1
jmp 0x405e17
mov edx, dword [ebp - 0x294]
dec edx
cmp edx, dword [ebp - 0x290]
jae 0x405e26
push ebx
call fcn.0059ce64
pop ecx
mov eax, dword [ebx + 0x24]
cmp eax, dword [ebp - 0x290]
jae 0x405f0f
mov ecx, dword [ebx + 0x20]
push ecx
mov ecx, dword [ebp - 0x290]
push ecx
push ebx
call fcn.00403ebc
add esp, 0xc
jmp 0x405f48
cmp dword [ebp - 0x290], 0
jne 0x405f48
lea ecx, [ebx + 8]
push ecx
call fcn.004040bc
pop ecx
mov dword [ebp - 0x2d0], eax
cmp dword [ebp - 0x2d0], 1
ja 0x406019
mov eax, 1
jmp 0x406020
mov eax, dword [ebp - 0x2d0]
dec eax
cmp eax, dword [ebp - 0x240]
jae 0x40602f
push ebx
call fcn.0059ce64
pop ecx
mov edx, dword [ebx + 0x24]
cmp edx, dword [ebp - 0x240]
jae 0x406118
mov ecx, dword [ebx + 0x20]
push ecx
mov ecx, dword [ebp - 0x240]
push ecx
push ebx
call fcn.00403ebc
add esp, 0xc
jmp 0x406151
cmp dword [ebp - 0x240], 0
jne 0x406151
mov byte [ebp - 0x2e9], 0
cmp dword [ebx + 0x24], 0x10
and al, 0x10