Function at 0x405600
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 0x429ae0
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push ebp
push esi
push edi
mov eax, dword [0x43b14c]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [0x44130c]
mov edx, dword [eax + 0xc]
xor ebp, ebp
mov ecx, 0x44130c
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 0x405788
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [0x44130c]
mov edx, dword [eax + 0xc]
mov ecx, 0x44130c
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.004016c0
mov edi, dword [esp + 0x20]
add esp, 8
lea eax, [esp + 0x2c]
push eax
mov ecx, edi
call fcn.00403020
mov byte [esp + 0x50], 2
mov esi, dword [eax]
call fcn.00401aa0
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 0x4056e1
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 0x405702
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 0x405719
push eax
call fcn.00418e03
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 0x405734
push eax
call esi
mov eax, dword [esp + 0x28]
test eax, eax
je 0x40573f
push eax
call esi
mov eax, dword [esp + 0x40]
test eax, eax
je 0x40574a
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 0x405772
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 0x4057b0
mov eax, esi
lea edi, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x405791
sub eax, edi
sar eax, 1
je 0x4057b0
push ebp
push ebp
push 3
push ebp
push ebp
push 0x1bb
push esi
jmp 0x4057c0
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 0x40583f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [0x44130c]
mov esi, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x44130c
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.004016c0
mov edi, dword [esp + 0x20]
add esp, 8
lea ecx, [esp + 0x2c]
push ecx
mov ecx, edi
call fcn.00403020
mov byte [esp + 0x50], 4
mov esi, dword [eax]
call fcn.00401aa0
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 0x4056d5
mov ecx, dword [esp + 0x5c]
push ebp
push 0x4a83000
push ebp
push ebp
push ebp
push ecx
push 0x42d1fc
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov esi, eax
mov dword [esp + 0x1c], esi
cmp esi, ebp
jne 0x4058d3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [0x44130c]
mov esi, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x44130c
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.004016c0
mov edi, dword [esp + 0x20]
add esp, 8
lea ecx, [esp + 0x2c]
push ecx
mov ecx, edi
call fcn.00403020
mov byte [esp + 0x50], 6
mov esi, dword [eax]
call fcn.00401aa0
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 0x4056d5
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 [0x44130c]
mov eax, dword [edx + 0xc]
mov ecx, 0x44130c
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 0x405956
cmp ebx, eax
je 0x40595b
call fcn.00419b4a
cmp esi, edi
je 0x405a77
cmp ebx, ebp
jne 0x405a1e
call fcn.00419b4a
xor eax, eax
cmp esi, dword [eax + 0x18]
jne 0x40597c
call fcn.00419b4a
mov eax, dword [esi + 0xc]
push str.host
push eax
call fcn.004198f9
add esp, 8
test eax, eax
je 0x405a05
cmp ebx, ebp
jne 0x405a25
call fcn.00419b4a
xor eax, eax
cmp esi, dword [eax + 0x18]
jne 0x4059aa
call fcn.00419b4a
mov eax, dword [esi + 0xc]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea edx, [esp + 0x20]
push edx
call fcn.00403eb0
push 1
push 0x42d2e8
lea eax, [esp + 0x20]
push eax
call fcn.00403eb0
cmp ebx, ebp
jne 0x405a2c
call fcn.00419b4a
xor eax, eax
cmp esi, dword [eax + 0x18]
jne 0x4059e2
call fcn.00419b4a
mov eax, dword [esi + 0x10]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea edx, [esp + 0x20]
push edx
call fcn.00403eb0
push 2
push 0x42d2ec
lea eax, [esp + 0x20]
push eax
call fcn.00403eb0
cmp ebx, ebp
jne 0x405a0e
call fcn.00419b4a
cmp byte [esi + 0x15], 0
je 0x405a30
call fcn.00419b4a
jmp 0x405945
mov eax, dword [ebx]
jmp 0x405972
mov eax, dword [ebx]
jmp 0x4059a0
mov eax, dword [ebx]
jmp 0x4059d8
mov eax, dword [esi + 8]
cmp byte [eax + 0x15], 0
jne 0x405a56
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0x15], 0
jne 0x405945
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0x15], 0
je 0x405a47
jmp 0x405945
mov eax, dword [esi + 4]
cmp byte [eax + 0x15], 0
jne 0x405a70
nop
cmp esi, dword [eax + 8]
jne 0x405a70
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x15], 0
je 0x405a60
mov esi, eax
jmp 0x405945
push 6
push str.Host:
lea ecx, [esp + 0x20]
push ecx
call fcn.00403eb0
mov esi, dword [esp + 0x58]
cmp esi, ebp
jne 0x405a94
xor eax, eax
jmp 0x405aaf
mov eax, esi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x405aa0
sub eax, edx
sar eax, 1
push eax
push esi
lea edx, [esp + 0x20]
push edx
call fcn.00403eb0
mov ebp, dword [esp + 0x18]
cmp dword [ebp - 4], 1
mov esi, dword [ebp - 0xc]
jle 0x405ad9
mov eax, esi
push eax
lea ecx, [esp + 0x1c]
push ecx
call fcn.00401610
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 0x405b92
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [0x44130c]
mov esi, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x44130c
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.004016c0
mov edi, dword [esp + 0x34]
add esp, 8
lea ecx, [esp + 0x38]
push ecx
mov ecx, edi
call fcn.00403020
mov byte [esp + 0x50], 9
mov esi, dword [eax]
call fcn.00401aa0
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 0x405b69
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 0x405b8a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebp - 0x10]
jmp 0x4056e4
push 0xa000
mov dword [esp + 0x28], 0
call fcn.00418bbe
mov edi, eax
add esp, 4
test edi, edi
jne 0x405bfe
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [0x44130c]
mov esi, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x44130c
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.004016c0
mov edi, dword [esp + 0x34]
add esp, 8
lea ecx, [esp + 0x38]
push ecx
mov ecx, edi
call fcn.00403020
mov byte [esp + 0x50], 0xb
jmp 0x405b3e
lea ecx, [esp + 0x24]
push ecx
push 0xa000
push edi
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x405c89
mov esi, dword [esp + 0x24]
test esi, esi
je 0x405c89
xor ebp, ebp
test esi, esi
jne 0x405c2a
test ebp, ebp
je 0x405c6b
mov ebx, dword [esp + 0x64]
mov eax, dword [ebx]
test eax, eax
jne 0x405c3f
push esi
call fcn.00418ee0
add esp, 4
jmp 0x405c4e
mov edx, dword [ebx + 8]
add edx, esi
push edx
push eax
call fcn.00418faa
add esp, 8
mov dword [ebx], eax
test eax, eax
je 0x405c6b
mov ecx, dword [ebx + 8]
push esi
push edi
add ecx, eax
push esi
push ecx
call fcn.004191c5
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 0x405c18
push edi
call fcn.00418de9
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 0x405723
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x405723