Function at 0x405910
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 0x427710
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push ebp
push esi
push edi
mov eax, dword [0x43914c]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [0x43f30c]
mov edx, dword [eax + 0xc]
xor ebp, ebp
mov ecx, 0x43f30c
mov dword [esp + 0x28], ebp
mov dword [esp + 0x1c], ebp
call edx
add eax, 0x10
mov dword [esp + 0x44], eax
push ebp
push ebp
push ebp
push 1
push ebp
mov dword [esp + 0x64], ebp
mov dword [esp + 0x50], ebp
call dword [sym.imp.WININET.dll_InternetOpenW]
mov edx, eax
mov dword [esp + 0x40], edx
cmp edx, ebp
jne 0x405a98
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, eax
mov eax, dword [0x43f30c]
mov edx, dword [eax + 0xc]
mov ecx, 0x43f30c
call edx
add eax, 0x10
mov dword [esp + 0x18], eax
push esi
push str.hqd0__d
lea edi, [esp + 0x20]
mov byte [esp + 0x58], 1
call fcn.004016f0
mov edi, dword [esp + 0x20]
add esp, 8
lea eax, [esp + 0x2c]
push eax
mov ecx, edi
call fcn.00403280
mov byte [esp + 0x50], 2
mov esi, dword [eax]
call fcn.00401ad0
mov byte [esp + 0x50], 1
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4059f1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov byte [esp + 0x50], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405a12
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x64]
mov eax, dword [esi]
xor edi, edi
cmp eax, edi
je 0x405a29
push eax
call fcn.00416b73
add esp, 4
mov dword [esi], edi
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
mov edi, dword [esp + 0x3c]
mov eax, dword [esp + 0x1c]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
test eax, eax
je 0x405a44
push eax
call esi
mov eax, dword [esp + 0x28]
test eax, eax
je 0x405a4f
push eax
call esi
mov eax, dword [esp + 0x40]
test eax, eax
je 0x405a5a
push eax
call esi
mov dword [esp + 0x50], 0xffffffff
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405a82
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
cmp esi, ebp
je 0x405ac0
mov eax, esi
lea edi, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x405aa1
sub eax, edi
sar eax, 1
je 0x405ac0
push ebp
push ebp
push 3
push ebp
push ebp
push 0x1bb
push esi
jmp 0x405ad0
mov ecx, dword [esp + 0x58]
push ebp
push ebp
push 3
push ebp
push ebp
push 0x1bb
push ecx
push edx
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [esp + 0x28], eax
cmp eax, ebp
jne 0x405b4f
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov edx, dword [0x43f30c]
mov esi, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x43f30c
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
push esi
push str.hqd1__d
lea edi, [esp + 0x20]
mov byte [esp + 0x58], 3
call fcn.004016f0
mov edi, dword [esp + 0x20]
add esp, 8
lea ecx, [esp + 0x2c]
push ecx
mov ecx, edi
call fcn.00403280
mov byte [esp + 0x50], 4
mov esi, dword [eax]
call fcn.00401ad0
mov byte [esp + 0x50], 3
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x4059e5
mov ecx, dword [esp + 0x5c]
push ebp
push 0x4a83000
push ebp
push ebp
push ebp
push ecx
push 0x42b30c
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov esi, eax
mov dword [esp + 0x1c], esi
cmp esi, ebp
jne 0x405be3
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov edx, dword [0x43f30c]
mov esi, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x43f30c
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
push esi
mov bl, 5
push str.hqd2__d
lea edi, [esp + 0x20]
mov byte [esp + 0x58], bl
call fcn.004016f0
mov edi, dword [esp + 0x20]
add esp, 8
lea ecx, [esp + 0x2c]
push ecx
mov ecx, edi
call fcn.00403280
mov byte [esp + 0x50], 6
mov esi, dword [eax]
call fcn.00401ad0
mov byte [esp + 0x50], bl
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x4059e5
push 4
lea ecx, [esp + 0x34]
push ecx
push 0x41
push esi
mov dword [esp + 0x40], 1
call dword [sym.imp.WININET.dll_InternetSetOptionA]
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x24]
push eax
push 0x1f
push esi
mov dword [esp + 0x44], 4
call dword [sym.imp.WININET.dll_InternetQueryOptionW]
or dword [esp + 0x20], 0x3380
push 4
lea ecx, [esp + 0x24]
push ecx
push 0x1f
push esi
call dword [sym.imp.WININET.dll_InternetSetOptionW]
mov edx, dword [0x43f30c]
mov eax, dword [edx + 0xc]
mov ecx, 0x43f30c
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x60]
mov byte [esp + 0x50], 7
mov eax, dword [ecx + 0x18]
mov esi, dword [eax]
mov ebx, dword [ecx]
mov eax, dword [esp + 0x60]
mov edi, dword [eax + 0x18]
mov eax, dword [eax]
cmp ebx, ebp
je 0x405c66
cmp ebx, eax
je 0x405c6b
call fcn.004178ba
cmp esi, edi
je 0x405d87
cmp ebx, ebp
jne 0x405d2e
call fcn.004178ba
xor eax, eax
cmp esi, dword [eax + 0x18]
jne 0x405c8c
call fcn.004178ba
mov eax, dword [esi + 0xc]
push str.host
push eax
call fcn.00417669
add esp, 8
test eax, eax
je 0x405d15
cmp ebx, ebp
jne 0x405d35
call fcn.004178ba
xor eax, eax
cmp esi, dword [eax + 0x18]
jne 0x405cba
call fcn.004178ba
mov eax, dword [esi + 0xc]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea edx, [esp + 0x20]
push edx
call fcn.004041b0
push 1
push 0x42b3f8
lea eax, [esp + 0x20]
push eax
call fcn.004041b0
cmp ebx, ebp
jne 0x405d3c
call fcn.004178ba
xor eax, eax
cmp esi, dword [eax + 0x18]
jne 0x405cf2
call fcn.004178ba
mov eax, dword [esi + 0x10]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea edx, [esp + 0x20]
push edx
call fcn.004041b0
push 2
push 0x42b3fc
lea eax, [esp + 0x20]
push eax
call fcn.004041b0
cmp ebx, ebp
jne 0x405d1e
call fcn.004178ba
cmp byte [esi + 0x15], 0
je 0x405d40
call fcn.004178ba
jmp 0x405c55
mov eax, dword [ebx]
jmp 0x405c82
mov eax, dword [ebx]
jmp 0x405cb0
mov eax, dword [ebx]
jmp 0x405ce8
mov eax, dword [esi + 8]
cmp byte [eax + 0x15], 0
jne 0x405d66
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0x15], 0
jne 0x405c55
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0x15], 0
je 0x405d57
jmp 0x405c55
mov eax, dword [esi + 4]
cmp byte [eax + 0x15], 0
jne 0x405d80
nop
cmp esi, dword [eax + 8]
jne 0x405d80
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x15], 0
je 0x405d70
mov esi, eax
jmp 0x405c55
push 6
push str.Host:
lea ecx, [esp + 0x20]
push ecx
call fcn.004041b0
mov esi, dword [esp + 0x58]
cmp esi, ebp
jne 0x405da4
xor eax, eax
jmp 0x405dbf
mov eax, esi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x405db0
sub eax, edx
sar eax, 1
push eax
push esi
lea edx, [esp + 0x20]
push edx
call fcn.004041b0
mov ebp, dword [esp + 0x18]
cmp dword [ebp - 4], 1
mov esi, dword [ebp - 0xc]
jle 0x405de9
mov eax, esi
push eax
lea ecx, [esp + 0x1c]
push ecx
call fcn.00401640
mov ebp, dword [esp + 0x18]
push 0
push 0
push esi
mov esi, dword [esp + 0x28]
push ebp
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x405ea2
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov edx, dword [0x43f30c]
mov esi, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x43f30c
call eax
add eax, 0x10
mov dword [esp + 0x2c], eax
push esi
mov bl, 8
push str.hqd3__d
lea edi, [esp + 0x34]
mov byte [esp + 0x58], bl
call fcn.004016f0
mov edi, dword [esp + 0x34]
add esp, 8
lea ecx, [esp + 0x38]
push ecx
mov ecx, edi
call fcn.00403280
mov byte [esp + 0x50], 9
mov esi, dword [eax]
call fcn.00401ad0
mov byte [esp + 0x50], bl
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
or ecx, 0xffffffff
lea edx, [eax + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405e79
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov byte [esp + 0x50], 7
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405e9a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebp - 0x10]
jmp 0x4059f4
push 0xa000
mov dword [esp + 0x28], 0
call fcn.0041692e
mov edi, eax
add esp, 4
test edi, edi
jne 0x405f0e
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov edx, dword [0x43f30c]
mov esi, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x43f30c
call eax
add eax, 0x10
mov dword [esp + 0x2c], eax
push esi
mov bl, 0xa
push str.hqd4__d
lea edi, [esp + 0x34]
mov byte [esp + 0x58], bl
call fcn.004016f0
mov edi, dword [esp + 0x34]
add esp, 8
lea ecx, [esp + 0x38]
push ecx
mov ecx, edi
call fcn.00403280
mov byte [esp + 0x50], 0xb
jmp 0x405e4e
lea ecx, [esp + 0x24]
push ecx
push 0xa000
push edi
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x405f99
mov esi, dword [esp + 0x24]
test esi, esi
je 0x405f99
xor ebp, ebp
test esi, esi
jne 0x405f3a
test ebp, ebp
je 0x405f7b
mov ebx, dword [esp + 0x64]
mov eax, dword [ebx]
test eax, eax
jne 0x405f4f
push esi
call fcn.00416c50
add esp, 4
jmp 0x405f5e
mov edx, dword [ebx + 8]
add edx, esi
push edx
push eax
call fcn.00416d1a
add esp, 8
mov dword [ebx], eax
test eax, eax
je 0x405f7b
mov ecx, dword [ebx + 8]
push esi
push edi
add ecx, eax
push esi
push ecx
call fcn.00416f35
add esp, 0x10
add dword [ebx + 8], esi
adc dword [ebx + 0xc], ebp
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x24]
push edx
push 0xa000
push edi
push eax
call dword [sym.imp.WININET.dll_InternetReadFile]
mov ebp, dword [esp + 0x18]
test eax, eax
jne 0x405f28
push edi
call fcn.00416b59
lea eax, [ebp - 0x10]
add esp, 4
mov edi, 1
mov byte [esp + 0x50], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405a33
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x405a33