Function at 0x404060
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket
Send http request
Send http request with host header
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4199f4
mov eax, dword fs:[0]
push eax
mov eax, 0x1090
call fcn.004163d0
mov eax, dword [0x41f3c4]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1094], eax
mov dword [ebp - 0x1098], ecx
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, 0xf
mov dword [ebp - 0x1038], eax
mov dword [ebp - 0x103c], ebx
mov byte [ebp - 0x104c], bl
mov dword [ebp - 0x101c], eax
mov dword [ebp - 0x1020], ebx
mov byte [ebp - 0x1030], bl
lea edx, [ebp - 0x1030]
push edx
lea ecx, [ebp - 0x104c]
push ecx
sub esp, 0x1c
mov byte [ebp - 4], 2
mov dword [ebp - 0x108c], esp
mov ecx, esp
push 0xffffffffffffffff
push ebx
lea edx, [ebp + 0xc]
mov dword [ecx + 0x14], eax
mov dword [ecx + 0x10], ebx
push edx
mov dword [ebp - 0x1090], 0xffffffff
lea esi, [ebp - 0x1090]
lea edi, [ebp + 0x28]
mov byte [ecx], bl
call fcn.004037a0
mov edx, esi
mov ecx, edi
call fcn.00403dc0
add esp, 0x24
cmp eax, ebx
jne 0x40419a
mov esi, 0x10
cmp dword [ebp - 0x101c], esi
jb 0x40413f
mov eax, dword [ebp - 0x1030]
push eax
call fcn.0040a55f
add esp, 4
mov edi, 0xf
mov dword [ebp - 0x101c], edi
mov dword [ebp - 0x1020], ebx
mov byte [ebp - 0x1030], bl
cmp dword [ebp - 0x1038], esi
jb 0x40416d
mov ecx, dword [ebp - 0x104c]
push ecx
call fcn.0040a55f
add esp, 4
mov dword [ebp - 0x1038], edi
mov dword [ebp - 0x103c], ebx
mov byte [ebp - 0x104c], bl
cmp dword [ebp + 0x20], esi
jb 0x404190
mov edx, dword [ebp + 0xc]
push edx
call fcn.0040a55f
add esp, 4
mov eax, 1
jmp 0x4045f5
push 0xfff
lea eax, [ebp - 0x1013]
push ebx
push eax
mov byte [ebp - 0x1014], bl
call fcn.00412870
mov edx, dword [ebp + 0x28]
mov ecx, dword [ebp - 0x104c]
add esp, 0xc
mov eax, 0x10
cmp edx, 0x50
je 0x404203
cmp dword [ebp - 0x1038], eax
jae 0x4041d6
lea ecx, [ebp - 0x104c]
cmp dword [ebp - 0x101c], eax
mov eax, dword [ebp - 0x1030]
jae 0x4041ea
lea eax, [ebp - 0x1030]
push edx
push ecx
push eax
lea ecx, [ebp - 0x1014]
push str.GET__s_HTTP_1.0_r_nHost:_s:_d_r_nAccept:___r_nUser_Agent:Mozilla_4.0_compatible__MSIE_5.00__Windows_98__r_nConnection:Keep_Alive_r_n_r_n
push ecx
call fcn.0040a4db
add esp, 0x14
jmp 0x40423b
cmp dword [ebp - 0x1038], eax
jae 0x404211
lea ecx, [ebp - 0x104c]
cmp dword [ebp - 0x101c], eax
mov eax, dword [ebp - 0x1030]
jae 0x404225
lea eax, [ebp - 0x1030]
push ecx
push eax
lea edx, [ebp - 0x1014]
push str.GET__s_HTTP_1.0_r_nHost:_s_r_nAccept:___r_nUser_Agent:Mozilla_4.0_compatible__MSIE_5.00__Windows_98__r_nConnection:Keep_Alive_r_n_r_n
push edx
call fcn.0040a4db
add esp, 0x10
mov edi, dword [ebp - 0x1090]
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea eax, [ebp - 0x108c]
push eax
push 0x1005
push 0xffff
push edi
mov dword [ebp - 0x108c], 0x64
call esi
test eax, eax
je 0x4042e9
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov esi, 0x10
cmp dword [ebp - 0x101c], esi
jb 0x40428e
mov ecx, dword [ebp - 0x1030]
push ecx
call fcn.0040a55f
add esp, 4
mov edi, 0xf
mov dword [ebp - 0x101c], edi
mov dword [ebp - 0x1020], ebx
mov byte [ebp - 0x1030], bl
cmp dword [ebp - 0x1038], esi
jb 0x4042bc
mov edx, dword [ebp - 0x104c]
push edx
call fcn.0040a55f
add esp, 4
mov dword [ebp - 0x1038], edi
mov dword [ebp - 0x103c], ebx
mov byte [ebp - 0x104c], bl
cmp dword [ebp + 0x20], esi
jb 0x4042df
mov eax, dword [ebp + 0xc]
push eax
call fcn.0040a55f
add esp, 4
mov eax, 4
jmp 0x4045f5
lea eax, [ebp - 0x1014]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4042f2
push ebx
sub eax, edx
push eax
lea ecx, [ebp - 0x1014]
push ecx
push edi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x40438e
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov esi, 0x10
cmp dword [ebp - 0x101c], esi
jb 0x404333
mov edx, dword [ebp - 0x1030]
push edx
call fcn.0040a55f
add esp, 4
mov edi, 0xf
mov dword [ebp - 0x101c], edi
mov dword [ebp - 0x1020], ebx
mov byte [ebp - 0x1030], bl
cmp dword [ebp - 0x1038], esi
jb 0x404361
mov eax, dword [ebp - 0x104c]
push eax
call fcn.0040a55f
add esp, 4
mov dword [ebp - 0x1038], edi
mov dword [ebp - 0x103c], ebx
mov byte [ebp - 0x104c], bl
cmp dword [ebp + 0x20], esi
jb 0x404384
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.0040a55f
add esp, 4
mov eax, 2
jmp 0x4045f5
push 4
lea edx, [ebp - 0x108c]
push edx
push 0x1006
push 0xffff
push edi
call esi
cmp eax, ebx
je 0x4043d7
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
lea ecx, [ebp - 0x1030]
call fcn.004036e0
lea ecx, [ebp - 0x104c]
call fcn.004036e0
lea ecx, [ebp + 0xc]
call fcn.004036e0
mov eax, 4
jmp 0x4045f5
mov byte [ebp - 0x1085], bl
xor esi, esi
nop
push ebx
push 1
lea eax, [ebp - 0x1085]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
mov cl, byte [ebp - 0x1085]
mov byte [ebp + esi - 0x1014], cl
inc esi
cmp esi, 4
jl 0x40442c
cmp byte [ebp + esi - 0x1018], 0xd
jne 0x40442c
cmp byte [ebp + esi - 0x1017], 0xa
jne 0x40442c
cmp byte [ebp + esi - 0x1016], 0xd
jne 0x40442c
cmp byte [ebp + esi - 0x1015], 0xa
je 0x404434
cmp esi, 0x400
jl 0x4043e0
push 0x41c84c
lea ecx, [ebp - 0x1084]
call fcn.00403c60
lea eax, [ebp - 0x1014]
mov byte [ebp - 4], 3
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x404451
sub eax, edx
push eax
lea eax, [ebp - 0x1014]
lea ecx, [ebp - 0x1084]
call fcn.00402900
lea eax, [ebp - 0x1014]
call fcn.00404e20
cmp eax, 0xc8
je 0x4044b8
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
lea ecx, [ebp - 0x1084]
call fcn.004036e0
lea ecx, [ebp - 0x1030]
call fcn.004036e0
lea ecx, [ebp - 0x104c]
call fcn.004036e0
lea ecx, [ebp + 0xc]
call fcn.004036e0
mov eax, 3
jmp 0x4045f5
push 0x41c84c
lea ecx, [ebp - 0x1068]
call fcn.00403c60
push 0x1000
lea edx, [ebp - 0x1014]
push ebx
push edx
mov byte [ebp - 4], 4
call fcn.00412870
mov esi, dword [sym.imp.WS2_32.dll_recv]
add esp, 0xc
push ebx
push 0x1000
lea eax, [ebp - 0x1014]
push eax
push edi
call esi
cmp eax, 0xffffffff
je 0x404555
lea esp, [esp]
cmp eax, ebx
je 0x404555
lea eax, [ebp - 0x1014]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x404510
sub eax, edx
push eax
lea eax, [ebp - 0x1014]
lea ecx, [ebp - 0x1068]
call fcn.00402900
push 0x1000
lea ecx, [ebp - 0x1014]
push ebx
push ecx
call fcn.00412870
add esp, 0xc
push ebx
push 0x1000
lea edx, [ebp - 0x1014]
push edx
push edi
call esi
cmp eax, 0xffffffff
jne 0x404500
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0x1058]
mov esi, dword [ebp - 0x1098]
mov dword [esi], eax
inc eax
push eax
call fcn.0040a215
mov edi, dword [ebp - 0x1094]
add esp, 4
mov dword [edi], eax
cmp eax, ebx
jne 0x404590
lea ecx, [ebp - 0x1068]
call fcn.004036e0
jmp 0x404485
mov ecx, dword [esi]
inc ecx
push ecx
push ebx
push eax
call fcn.00412870
mov edx, dword [ebp - 0x1068]
add esp, 0xc
cmp dword [ebp - 0x1054], 0x10
jae 0x4045b3
lea edx, [ebp - 0x1068]
mov ecx, dword [edi]
mov al, byte [edx]
mov byte [ecx], al
inc edx
inc ecx
cmp al, bl
jne 0x4045b5
lea ecx, [ebp - 0x1068]
call fcn.004036e0
lea ecx, [ebp - 0x1084]
call fcn.004036e0
lea ecx, [ebp - 0x1030]
call fcn.004036e0
lea ecx, [ebp - 0x104c]
call fcn.004036e0
lea ecx, [ebp + 0xc]
call fcn.004036e0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0040a4cc
mov esp, ebp
pop ebp
ret