Function at 0x405dd5
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
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
sub esp, 0x650
mov eax, dword [0x5498f8]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 6
push 1
push 2
mov esi, ecx
mov dword [ebp - 0x650], eax
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x648], eax
cmp eax, 0xffffffff
je 0x405f1c
mov edi, 0xff
xor ebx, ebx
push edi
lea eax, [ebp - 0x223]
push ebx
push eax
mov byte [ebp - 0x224], bl
call fcn.004f8f00
add esp, 0xc
push 0x100
push esi
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0x224]
push 0x531a40
push eax
call fcn.004f8030
mov esi, eax
pop ecx
pop ecx
mov dword [ebp - 0x64c], esi
cmp esi, ebx
je 0x405e6c
add esi, 7
mov dword [ebp - 0x64c], esi
jmp 0x405e7a
lea esi, [ebp - 0x224]
jmp 0x405e7a
cmp byte [esi], 0x2f
je 0x405e7e
inc esi
cmp byte [esi], bl
jne 0x405e74
push edi
lea eax, [ebp - 0x423]
push ebx
push eax
mov byte [ebp - 0x424], bl
call fcn.004f8f00
push edi
lea eax, [ebp - 0x323]
push ebx
push eax
mov byte [ebp - 0x324], bl
call fcn.004f8f00
add esp, 0x18
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, esi
lea edx, [ebp - 0x224]
sub ecx, edx
cmp ecx, eax
mov eax, 0x531a48
je 0x405ecb
mov eax, esi
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push eax
lea eax, [ebp - 0x424]
push eax
call ebx
cmp dword [ebp - 0x64c], 0
mov byte [esi], 0
lea eax, [ebp - 0x224]
je 0x405ef3
mov eax, dword [ebp - 0x64c]
push eax
lea eax, [ebp - 0x324]
push eax
call ebx
lea eax, [ebp - 0x324]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov esi, eax
test esi, esi
jne 0x405f2f
push dword [ebp - 0x648]
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
xor edx, edx
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004f7824
leave
ret
push 2
pop eax
push 0x50
mov word [ebp - 0x644], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x642], ax
mov eax, dword [esi + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x640], eax
cmp eax, 0xffffffff
je 0x405f10
push 0x10
lea eax, [ebp - 0x644]
push eax
push dword [ebp - 0x648]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x405f10
push edi
xor ebx, ebx
lea eax, [ebp - 0x123]
push ebx
push eax
mov byte [ebp - 0x124], 0
call fcn.004f8f00
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
add esp, 0xc
push 0x531a4c
lea eax, [ebp - 0x124]
push eax
call esi
lea eax, [ebp - 0x424]
push eax
lea eax, [ebp - 0x124]
push eax
call esi
push 0x531a54
lea eax, [ebp - 0x124]
push eax
call esi
push 0x531a60
lea eax, [ebp - 0x124]
push eax
call esi
lea eax, [ebp - 0x324]
push eax
lea eax, [ebp - 0x124]
push eax
call esi
push 0x531a68
lea eax, [ebp - 0x124]
push eax
call esi
lea eax, [ebp - 0x124]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x405ff5
push ebx
sub eax, ecx
push eax
lea eax, [ebp - 0x124]
push eax
push dword [ebp - 0x648]
call dword [sym.imp.WS2_32.dll_send]
push 0x1ff
lea eax, [ebp - 0x623]
push ebx
push eax
mov byte [ebp - 0x624], bl
call fcn.004f8f00
add esp, 0xc
push ebx
push 0x200
lea eax, [ebp - 0x624]
push eax
push dword [ebp - 0x648]
call dword [sym.imp.WS2_32.dll_recv]
push dword [ebp - 0x648]
call dword [sym.imp.WS2_32.dll_closesocket]
lea eax, [ebp - 0x624]
push 0x531a80
push eax
call fcn.004f8030
mov esi, eax
pop ecx
pop ecx
cmp esi, ebx
je 0x405f1c
add esi, 5
jmp 0x406076
inc esi
cmp byte [esi], 0x20
je 0x406075
xor eax, eax
mov byte [ebp - 0x20], bl
lea edi, [ebp - 0x1f]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosb byte es:[edi], al
lea edx, [ebp - 0x20]
xor edi, edi
mov ecx, esi
sub edx, esi
mov al, byte [ecx]
cmp al, 0x41
jl 0x406099
cmp al, 0x5a
jle 0x4060a1
cmp al, 0x61
jl 0x4060a8
cmp al, 0x7a
jg 0x4060a8
mov byte [edx + ecx], al
inc edi
inc ecx
jmp 0x40608f
add esi, edi
mov al, byte [esi]
cmp al, 0x20
je 0x4060b4
cmp al, 0x2c
jne 0x4060b7
inc esi
jmp 0x4060aa
xor eax, eax
mov word [ebp - 0x634], ax
lea edi, [ebp - 0x632]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x20]
push eax
xor edi, edi
mov byte [ebp - 0x1d], bl
call fcn.0050e1ec
mov eax, dword [0x552d90]
pop ecx
jmp 0x4060f0
mov ecx, dword [ebp - 0x20]
cmp ecx, dword [eax]
je 0x4060f6
mov eax, dword [edi*4 + 0x552d94]
inc edi
cmp eax, ebx
jne 0x4060e1
jmp 0x4060fd
mov word [ebp - 0x630], di
cmp word [ebp - 0x630], 7
ja 0x405f1c
push esi
call fcn.004f850d
pop ecx
mov word [ebp - 0x62e], ax
cmp ax, 0x1f
ja 0x405f1c
mov bl, 0x30
jmp 0x40612c
cmp al, 0x39
jg 0x406135
inc esi
mov al, byte [esi]
cmp al, bl
jge 0x406127
jmp 0x406135
inc esi
cmp byte [esi], 0x20
je 0x406134
xor eax, eax
mov byte [ebp - 0x14], 0
lea edi, [ebp - 0x13]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosb byte es:[edi], al
lea edx, [ebp - 0x14]
xor edi, edi
mov ecx, esi
sub edx, esi
mov al, byte [ecx]
cmp al, 0x41
jl 0x406159
cmp al, 0x5a
jle 0x406161
cmp al, 0x61
jl 0x406168
cmp al, 0x7a
jg 0x406168
mov byte [edx + ecx], al
inc edi
inc ecx
jmp 0x40614f
add esi, edi
mov al, byte [esi]
cmp al, 0x20
je 0x406174
cmp al, 0x2c
jne 0x406177
inc esi
jmp 0x40616a
lea eax, [ebp - 0x14]
push eax
xor edi, edi
mov byte [ebp - 0x11], 0
call fcn.0050e1ec
mov eax, dword [0x552db0]
pop ecx
jmp 0x40619d
mov ecx, dword [ebp - 0x14]
inc edi
cmp ecx, dword [eax]
je 0x4061a3
mov eax, dword [edi*4 + 0x552db0]
test eax, eax
jne 0x40618e
jmp 0x4061aa
mov word [ebp - 0x632], di
cmp word [ebp - 0x632], 0
je 0x405f1c
cmp word [ebp - 0x632], 0xd
ja 0x405f1c
push esi
call fcn.004f850d
pop ecx
mov ecx, 0x76c
mov word [ebp - 0x634], ax
cmp ax, cx
jb 0x405f1c
jmp 0x4061e9
cmp al, 0x39
jg 0x4061ef
inc esi
mov al, byte [esi]
cmp al, bl
jge 0x4061e4
mov al, byte [esi]
cmp al, 0x20
je 0x4061f9
cmp al, 0x3a
jne 0x4061fc
inc esi
jmp 0x4061ef
push esi
call fcn.004f850d
pop ecx
mov word [ebp - 0x62c], ax
cmp ax, 0x18
ja 0x405f1c
jmp 0x40621b
cmp al, 0x39
jg 0x406221
inc esi
mov al, byte [esi]
cmp al, bl
jge 0x406216
mov al, byte [esi]
cmp al, 0x20
je 0x40622b
cmp al, 0x3a
jne 0x40622e
inc esi
jmp 0x406221
push esi
call fcn.004f850d
pop ecx
mov word [ebp - 0x62a], ax
cmp ax, 0x3c
ja 0x405f1c
jmp 0x40624d
cmp al, 0x39
jg 0x406253
inc esi
mov al, byte [esi]
cmp al, bl
jge 0x406248
mov al, byte [esi]
cmp al, 0x20
je 0x40625d
cmp al, 0x3a
jne 0x406260
inc esi
jmp 0x406253
push esi
call fcn.004f850d
pop ecx
mov word [ebp - 0x628], ax
cmp ax, 0x3c
ja 0x405f1c
mov esi, dword [ebp - 0x650]
test esi, esi
jne 0x406288
lea esi, [ebp - 0x634]
lea eax, [ebp - 0x634]
push eax
call fcn.00402ab9
pop ecx
mov edi, eax
push esi
lea eax, [ebp - 0x634]
push eax
push 0x552df0
mov ebx, edx
call dword [sym.imp.KERNEL32.dll_SystemTimeToTzSpecificLocalTime]
mov eax, edi
mov edx, ebx
jmp 0x405f20