Function at 0x405f80
Capabilities:
Connect to http server
Create http request
Read data from internet
Receive data
Send data
Send http request
Send http request with host header

Disassembly:
push 0xffffffffffffffff
push 0x428a00
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push ebp
push esi
push edi
mov eax, dword [0x43a14c]
xor eax, esp
push eax
lea eax, [esp + 0x44]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [0x44030c]
mov edx, dword [eax + 0xc]
xor ebp, ebp
mov ecx, 0x44030c
mov dword [esp + 0x24], ebp
mov dword [esp + 0x18], ebp
call edx
add eax, 0x10
mov dword [esp + 0x40], eax
push ebp
push ebp
push ebp
push 1
push ebp
mov dword [esp + 0x60], ebp
mov dword [esp + 0x4c], ebp
call dword [sym.imp.WININET.dll_InternetOpenW]
mov edi, eax
mov dword [esp + 0x3c], edi
cmp edi, ebp
jne 0x406138
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [0x44030c]
mov edx, dword [eax + 0xc]
mov ecx, 0x44030c
call edx
add eax, 0x10
mov dword [esp + 0x14], eax
push esi
push str.hqd0__d
lea edi, [esp + 0x1c]
mov byte [esp + 0x54], 1
call fcn.004016c0
mov edi, dword [esp + 0x1c]
add esp, 8
lea eax, [esp + 0x28]
push eax
mov ecx, edi
call fcn.00403430
push 0x42bf8c
mov byte [esp + 0x50], 2
mov esi, dword [eax]
push 0x4410d8
lea edx, [ebp + 1]
call fcn.00404420
cmp esi, ebp
jne 0x406051
xor eax, eax
jmp 0x40605f
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406056
sub eax, edx
push esi
push 0x4410d8
mov edx, eax
call fcn.00404420
mov byte [esp + 0x4c], 1
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406091
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x4c], 0
lea eax, [edi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4060b2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x60]
mov eax, dword [esi]
xor edi, edi
cmp eax, edi
je 0x4060c9
push eax
call fcn.00418163
add esp, 4
mov dword [esi], edi
mov ebp, dword [esp + 0x18]
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
mov edi, dword [esp + 0x38]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
test ebp, ebp
je 0x4060e4
push ebp
call esi
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4060ef
push eax
call esi
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x4060fa
push eax
call esi
mov dword [esp + 0x4c], 0xffffffff
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406122
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
cmp esi, ebp
je 0x406160
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x406141
sub eax, edx
sar eax, 1
je 0x406160
push ebp
push ebp
push 3
push ebp
push ebp
push 0x1bb
push esi
jmp 0x406170
mov ecx, dword [esp + 0x54]
push ebp
push ebp
push 3
push ebp
push ebp
push 0x1bb
push ecx
push edi
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [esp + 0x24], eax
cmp eax, ebp
jne 0x406225
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [0x44030c]
mov esi, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x44030c
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
push esi
push str.hqd1__d
lea edi, [esp + 0x1c]
mov byte [esp + 0x54], 3
call fcn.004016c0
mov edi, dword [esp + 0x1c]
add esp, 8
lea ecx, [esp + 0x28]
push ecx
mov ecx, edi
call fcn.00403430
push 0x42bf8c
mov byte [esp + 0x50], 4
mov esi, dword [eax]
push 0x4410d8
mov edx, 1
call fcn.00404420
cmp esi, ebp
jne 0x4061ec
xor eax, eax
jmp 0x4061fa
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4061f1
sub eax, edx
push esi
push 0x4410d8
mov edx, eax
call fcn.00404420
mov byte [esp + 0x4c], 3
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x406085
mov ecx, dword [esp + 0x58]
push ebp
push 0x4a83000
push ebp
push ebp
push ebp
push ecx
push 0x42c30c
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov ebx, eax
mov dword [esp + 0x18], ebx
cmp ebx, ebp
jne 0x4062f3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [0x44030c]
mov esi, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x44030c
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
push esi
mov bl, 5
push str.hqd2__d
lea edi, [esp + 0x1c]
mov byte [esp + 0x54], bl
call fcn.004016c0
mov edi, dword [esp + 0x1c]
add esp, 8
lea ecx, [esp + 0x28]
push ecx
mov ecx, edi
call fcn.00403430
push 0x42bf8c
mov byte [esp + 0x50], 6
mov esi, dword [eax]
push 0x4410d8
mov edx, 1
call fcn.00404420
cmp esi, ebp
jne 0x4062b7
xor eax, eax
jmp 0x4062c9
mov eax, esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4062c0
sub eax, edx
push esi
push 0x4410d8
mov edx, eax
call fcn.00404420
mov byte [esp + 0x4c], bl
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x406085
push 4
lea ecx, [esp + 0x30]
push ecx
push 0x41
push ebx
mov dword [esp + 0x3c], 1
call dword [sym.imp.WININET.dll_InternetSetOptionA]
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0x20]
push eax
push 0x1f
push ebx
mov dword [esp + 0x40], 4
call dword [sym.imp.WININET.dll_InternetQueryOptionW]
or dword [esp + 0x1c], 0x3380
push 4
lea ecx, [esp + 0x20]
push ecx
push 0x1f
push ebx
call dword [sym.imp.WININET.dll_InternetSetOptionW]
mov edx, dword [0x44030c]
mov eax, dword [edx + 0xc]
mov ecx, 0x44030c
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x5c]
mov byte [esp + 0x4c], 7
mov eax, dword [ecx + 0x18]
mov esi, dword [eax]
mov ebp, dword [ecx]
mov eax, dword [esp + 0x5c]
mov edi, dword [eax + 0x18]
mov eax, dword [eax]
test ebp, ebp
je 0x406376
cmp ebp, eax
je 0x40637b
call fcn.00418f81
cmp esi, edi
je 0x40649f
test ebp, ebp
jne 0x40643e
call fcn.00418f81
xor eax, eax
cmp esi, dword [eax + 0x18]
jne 0x40639c
call fcn.00418f81
mov eax, dword [esi + 0xc]
push str.host
push eax
call fcn.00418d30
add esp, 8
test eax, eax
je 0x406425
test ebp, ebp
jne 0x406446
call fcn.00418f81
xor eax, eax
cmp esi, dword [eax + 0x18]
jne 0x4063ca
call fcn.00418f81
mov eax, dword [esi + 0xc]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea edx, [esp + 0x1c]
push edx
call fcn.004045b0
push 1
push 0x42c3f8
lea eax, [esp + 0x1c]
push eax
call fcn.004045b0
test ebp, ebp
jne 0x40644e
call fcn.00418f81
xor eax, eax
cmp esi, dword [eax + 0x18]
jne 0x406402
call fcn.00418f81
mov eax, dword [esi + 0x10]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea edx, [esp + 0x1c]
push edx
call fcn.004045b0
push 2
push 0x42c3fc
lea eax, [esp + 0x1c]
push eax
call fcn.004045b0
test ebp, ebp
jne 0x40642e
call fcn.00418f81
cmp byte [esi + 0x15], 0
je 0x406453
call fcn.00418f81
jmp 0x406365
mov eax, dword [ebp]
jmp 0x406392
mov eax, dword [ebp]
jmp 0x4063c0
mov eax, dword [ebp]
jmp 0x4063f8
mov eax, dword [esi + 8]
cmp byte [eax + 0x15], 0
jne 0x40647f
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0x15], 0
jne 0x406365
lea ebx, [ebx]
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0x15], 0
je 0x406470
jmp 0x406365
mov eax, dword [esi + 4]
cmp byte [eax + 0x15], 0
jne 0x406498
cmp esi, dword [eax + 8]
jne 0x406498
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x15], 0
je 0x406488
mov esi, eax
jmp 0x406365
push 6
push str.Host:
lea ecx, [esp + 0x1c]
push ecx
call fcn.004045b0
mov esi, dword [esp + 0x54]
test esi, esi
jne 0x4064bc
xor eax, eax
jmp 0x4064d0
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4064c1
sub eax, edx
sar eax, 1
push eax
push esi
lea edx, [esp + 0x1c]
push edx
call fcn.004045b0
mov eax, dword [esp + 0x14]
cmp dword [eax - 4], 1
mov esi, dword [eax - 0xc]
jle 0x4064fa
mov eax, esi
push eax
lea ecx, [esp + 0x18]
push ecx
call fcn.00401610
mov eax, dword [esp + 0x14]
push 0
push 0
push esi
push eax
push ebx
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x4065ec
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [0x44030c]
mov esi, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x44030c
call eax
add eax, 0x10
mov dword [esp + 0x28], eax
push esi
mov bl, 8
push str.hqd3__d
lea edi, [esp + 0x30]
mov byte [esp + 0x54], bl
call fcn.004016c0
mov edi, dword [esp + 0x30]
add esp, 8
lea ecx, [esp + 0x34]
push ecx
mov ecx, edi
call fcn.00403430
push 0x42bf8c
mov byte [esp + 0x50], 9
mov esi, dword [eax]
push 0x4410d8
mov edx, 1
call fcn.00404420
test esi, esi
jne 0x406579
xor eax, eax
jmp 0x406589
mov eax, esi
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406580
sub eax, edx
push esi
push 0x4410d8
mov edx, eax
call fcn.00404420
mov byte [esp + 0x4c], bl
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
or ecx, 0xffffffff
lea edx, [eax + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4065ba
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov byte [esp + 0x4c], 7
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4065db
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x4c], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
jmp 0x406099
push 0xa000
mov dword [esp + 0x24], 0
call fcn.00417f1e
mov edi, eax
add esp, 4
test edi, edi
jne 0x40668c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [0x44030c]
mov esi, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x44030c
call eax
add eax, 0x10
mov dword [esp + 0x28], eax
push esi
mov bl, 0xa
push str.hqd4__d
lea edi, [esp + 0x30]
mov byte [esp + 0x54], bl
call fcn.004016c0
mov edi, dword [esp + 0x30]
add esp, 8
lea ecx, [esp + 0x34]
push ecx
mov ecx, edi
call fcn.00403430
push 0x42bf8c
mov byte [esp + 0x50], 0xb
mov esi, dword [eax]
push 0x4410d8
mov edx, 1
call fcn.00404420
test esi, esi
jne 0x406678
xor eax, eax
jmp 0x406589
mov eax, esi
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406680
jmp 0x406587
mov ebp, dword [esp + 0x18]
mov ebx, dword [sym.imp.WININET.dll_InternetReadFile]
lea ecx, [esp + 0x20]
push ecx
push 0xa000
push edi
push ebp
call ebx
test eax, eax
je 0x406735
lea esp, [esp]
mov esi, dword [esp + 0x20]
test esi, esi
je 0x406735
xor ebp, ebp
test esi, esi
jne 0x4066c2
test ebp, ebp
je 0x40671b
mov edx, dword [esp + 0x60]
mov eax, dword [edx]
test eax, eax
jne 0x4066dd
push esi
call fcn.00418240
mov ecx, dword [esp + 0x64]
add esp, 4
mov dword [ecx], eax
jmp 0x4066f2
mov ecx, dword [edx + 8]
add ecx, esi
push ecx
push eax
call fcn.0041830a
mov edx, dword [esp + 0x68]
add esp, 8
mov dword [edx], eax
mov eax, dword [esp + 0x60]
mov eax, dword [eax]
test eax, eax
je 0x40671b
mov ecx, dword [esp + 0x60]
mov edx, dword [ecx + 8]
push esi
push edi
add edx, eax
push esi
push edx
call fcn.00418525
mov eax, dword [esp + 0x70]
add esp, 0x10
add dword [eax + 8], esi
adc dword [eax + 0xc], ebp
mov ebp, dword [esp + 0x18]
lea eax, [esp + 0x20]
push eax
push 0xa000
push edi
push ebp
call ebx
test eax, eax
jne 0x4066b0
push edi
call fcn.00418149
mov byte [esp + 0x50], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
add esp, 4
mov edi, 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4060d7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x4060d7