Function at 0x40421d
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 0x38
mov eax, 0x423d8d
call fcn.0041514d
mov eax, dword [0x43b30c]
xor ebx, ebx
mov edi, 0x43b30c
mov ecx, edi
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x44], eax
push ebx
push ebx
push ebx
xor esi, esi
inc esi
push esi
push ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x2c], ebx
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 0x28], eax
cmp eax, ebx
jne 0x4042fd
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, eax
mov eax, dword [0x43b30c]
mov ecx, edi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x24], eax
push esi
push str.hqd0__d
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 1
call fcn.00401552
mov esi, dword [ebp - 0x24]
pop ecx
pop ecx
push esi
lea eax, [ebp - 0x10]
push eax
call fcn.0040251b
mov byte [ebp - 4], 2
push dword [eax]
call fcn.00401820
mov eax, dword [ebp - 0x10]
pop ecx
add eax, 0xfffffff0
call fcn.0040159d
lea eax, [esi - 0x10]
call fcn.0040159d
mov esi, dword [ebp + 0x18]
call fcn.00401005
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x14], ebx
je 0x4042d5
push dword [ebp - 0x14]
call esi
cmp dword [ebp - 0x18], ebx
je 0x4042df
push dword [ebp - 0x18]
call esi
cmp dword [ebp - 0x28], ebx
je 0x4042e9
push dword [ebp - 0x28]
call esi
mov eax, dword [ebp - 0x44]
add eax, 0xfffffff0
call fcn.0040159d
mov eax, dword [ebp - 0x2c]
call fcn.00415225
ret
mov ecx, dword [ebp + 0xc]
cmp ecx, ebx
je 0x40432b
lea edx, [ecx + 2]
mov dword [ebp - 0x24], edx
mov dx, word [ecx]
inc ecx
inc ecx
cmp dx, bx
jne 0x40430a
sub ecx, dword [ebp - 0x24]
sar ecx, 1
je 0x40432b
push ebx
push ebx
push 3
push ebx
push ebx
push 0x1bb
push dword [ebp + 0xc]
jmp 0x404339
push ebx
push ebx
push 3
push ebx
push ebx
push 0x1bb
push dword [ebp + 8]
push eax
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [ebp - 0x18], eax
cmp eax, ebx
jne 0x404389
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, eax
mov eax, dword [0x43b30c]
mov ecx, edi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x24], eax
push esi
push str.hqd1__d
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 3
call fcn.00401552
mov esi, dword [ebp - 0x24]
pop ecx
pop ecx
push esi
lea eax, [ebp - 0x10]
push eax
call fcn.0040251b
mov byte [ebp - 4], 4
jmp 0x4042a2
push ebx
push 0x4a83000
push ebx
push ebx
push ebx
push dword [ebp + 0x10]
push 0x4271fc
push dword [ebp - 0x18]
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [ebp - 0x14], eax
cmp eax, ebx
jne 0x4043ec
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, eax
mov eax, dword [0x43b30c]
mov ecx, edi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x24], eax
push esi
push str.hqd2__d
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 5
call fcn.00401552
mov esi, dword [ebp - 0x24]
pop ecx
pop ecx
push esi
lea eax, [ebp - 0x10]
push eax
call fcn.0040251b
mov byte [ebp - 4], 6
jmp 0x4042a2
push 4
pop ebx
push ebx
lea ecx, [ebp - 0x30]
push ecx
push 0x41
mov dword [ebp - 0x30], esi
mov esi, dword [sym.imp.WININET.dll_InternetSetOptionA]
push eax
call esi
push ebx
lea eax, [ebp - 0x34]
push eax
push 2
push dword [ebp - 0x14]
mov dword [ebp - 0x34], 0x3e8
call esi
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x20]
push eax
push 0x1f
push dword [ebp - 0x14]
mov dword [ebp - 0x38], ebx
call dword [sym.imp.WININET.dll_InternetQueryOptionW]
or dword [ebp - 0x20], 0x3380
push ebx
lea eax, [ebp - 0x20]
push eax
push 0x1f
push dword [ebp - 0x14]
call dword [sym.imp.WININET.dll_InternetSetOptionW]
mov eax, dword [0x43b30c]
mov ecx, edi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp + 0x14]
mov byte [ebp - 4], 7
mov eax, dword [ecx + 0x18]
mov eax, dword [eax]
mov dword [ebp - 0x3c], eax
mov eax, dword [ecx]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
mov esi, dword [ecx + 0x18]
mov ecx, dword [ecx]
je 0x404476
cmp dword [ebp - 0x40], ecx
je 0x40447b
call fcn.00413eea
cmp dword [ebp - 0x3c], esi
je 0x4044eb
push str.host
lea esi, [ebp - 0x40]
call fcn.00404640
push eax
call fcn.00402754
test eax, eax
je 0x4044db
call fcn.00404640
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
lea eax, [ebp - 0x10]
call fcn.00402f67
push 0x4272e8
lea eax, [ebp - 0x10]
push eax
call fcn.00402736
call fcn.00404640
add eax, ebx
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
lea eax, [ebp - 0x10]
call fcn.00402f67
push 0x4272ec
lea eax, [ebp - 0x10]
push eax
call fcn.00402736
lea esi, [ebp - 0x40]
call fcn.004033b4
mov ecx, dword [ebp + 0x14]
jmp 0x404466
push str.Host:
lea eax, [ebp - 0x10]
push eax
call fcn.00402736
push dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
call fcn.00402736
mov eax, dword [ebp - 0x10]
mov eax, dword [eax - 0xc]
push 0
push 0
push eax
lea esi, [ebp - 0x10]
call fcn.0040290c
push eax
push dword [ebp - 0x14]
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x404590
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, eax
mov eax, dword [0x43b30c]
mov ecx, edi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x24], eax
push esi
push str.hqd3__d
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 8
call fcn.00401552
mov esi, dword [ebp - 0x24]
pop ecx
pop ecx
push esi
lea eax, [ebp - 0x3c]
push eax
call fcn.0040251b
mov byte [ebp - 4], 9
push dword [eax]
call fcn.00401820
mov eax, dword [ebp - 0x3c]
pop ecx
add eax, 0xfffffff0
call fcn.0040159d
lea eax, [esi - 0x10]
call fcn.0040159d
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
call fcn.0040159d
xor ebx, ebx
jmp 0x4042bd
and dword [ebp - 0x1c], 0
mov ebx, 0xa000
push ebx
call fcn.00412f5e
pop ecx
mov dword [ebp - 0x24], eax
test eax, eax
jne 0x4045e9
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, eax
mov eax, dword [0x43b30c]
mov ecx, edi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x24], eax
push esi
push str.hqd4__d
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 0xa
call fcn.00401552
mov esi, dword [ebp - 0x24]
pop ecx
pop ecx
push esi
lea eax, [ebp - 0x3c]
push eax
call fcn.0040251b
mov byte [ebp - 4], 0xb
jmp 0x404563
mov edi, dword [sym.imp.WININET.dll_InternetReadFile]
lea ecx, [ebp - 0x1c]
push ecx
push ebx
push eax
jmp 0x404615
cmp dword [ebp - 0x1c], 0
je 0x40461e
mov esi, dword [ebp + 0x18]
push 0
push dword [ebp - 0x1c]
push dword [ebp - 0x24]
call fcn.0040101e
lea eax, [ebp - 0x1c]
push eax
push ebx
push dword [ebp - 0x24]
push dword [ebp - 0x14]
call edi
test eax, eax
jne 0x4045f7
push dword [ebp - 0x24]
call fcn.00413189
mov eax, dword [ebp - 0x10]
pop ecx
add eax, 0xfffffff0
mov dword [ebp - 0x2c], 1
call fcn.0040159d
xor ebx, ebx
jmp 0x4042c5