Function at 0x4020b0
Capabilities:
Check http status code
Check internet connectivity via wininet
Connect to http server
Create http request
Get http content length
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push ebp
lea ebp, [esp - 0x190c8]
mov eax, 0x190c8
call fcn.00419720
push 0xffffffffffffffff
push 0x421eec
mov eax, dword fs:[0]
push eax
sub esp, 0x10c
mov eax, dword [0x42c2c0]
xor eax, ebp
mov dword [ebp + 0x190c4], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, edx
mov esi, ecx
mov dword [ebp - 0x28], edi
call fcn.00403330
xor edi, edi
mov dword [ebp - 4], edi
xor eax, eax
mov word [ebp + 0x58], ax
mov ebx, 7
mov eax, esi
mov dword [ebp + 0x6c], ebx
mov dword [ebp + 0x68], edi
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x402120
sub eax, edx
sar eax, 1
push eax
mov eax, esi
lea esi, [ebp + 0x54]
call fcn.00404870
mov byte [ebp - 4], 1
cmp dword [ebp + 0x68], edi
jne 0x40217c
cmp dword [ebp + 0x6c], 8
jb 0x402155
mov ecx, dword [ebp + 0x58]
push ecx
call fcn.0040a02d
add esp, 4
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x190c4]
xor ecx, ebp
call fcn.0040a038
add ebp, 0x190c8
mov esp, ebp
pop ebp
ret
push 0xffffffffffffffff
xor edx, edx
push edi
lea eax, [ebp + 0x54]
lea ecx, [ebp + 0xa8]
mov dword [ebp + 0xc0], ebx
mov dword [ebp + 0xbc], edi
mov word [ebp + 0xac], dx
call fcn.004047c0
xor eax, eax
mov dword [ebp + 0xa4], ebx
mov dword [ebp + 0xa0], edi
mov word [ebp + 0x90], ax
mov ebx, 3
push 0x429000
lea eax, [ebp + 0xa8]
mov byte [ebp - 4], bl
mov dword [ebp - 0x1c], 0x50
call fcn.00404920
cmp eax, 0xffffffff
je 0x4021fa
push 0x429000
lea eax, [ebp + 0xa8]
call fcn.00404920
add eax, ebx
xor ebx, ebx
lea esi, [ebp + 0xa8]
call fcn.00403900
mov edi, 0x2f
lea ecx, [ebp - 0x14]
push ecx
lea ebx, [edi - 0x2e]
lea eax, [ebp + 0xa8]
mov dword [ebp - 0x14], edi
call fcn.00404920
cmp eax, 0xffffffff
je 0x4022c6
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp + 0xa8]
mov dword [ebp - 0x14], edi
call fcn.00404920
lea edx, [eax + 1]
lea eax, [ebp + 0xa8]
push eax
or ecx, 0xffffffff
lea esi, [ebp + 0x70]
call fcn.00403990
push 0xffffffffffffffff
push 0
lea ecx, [ebp + 0x8c]
mov byte [ebp - 4], 4
call fcn.004047c0
mov byte [ebp - 4], 3
cmp dword [ebp + 0x88], 8
jb 0x402270
mov ecx, dword [ebp + 0x74]
push ecx
call fcn.0040a02d
add esp, 4
lea edx, [ebp - 0x14]
push edx
mov ebx, 1
lea eax, [ebp + 0xa8]
mov dword [ebp - 0x14], edi
call fcn.00404920
lea ecx, [ebp + 0xa8]
push ecx
mov ecx, eax
xor edx, edx
lea esi, [ebp + 0x70]
call fcn.00403990
push 0xffffffffffffffff
push 0
lea ecx, [ebp + 0xa8]
mov byte [ebp - 4], 5
call fcn.004047c0
mov byte [ebp - 4], 3
cmp dword [ebp + 0x88], 8
jb 0x4022c6
mov edx, dword [ebp + 0x74]
push edx
call fcn.0040a02d
add esp, 4
lea eax, [ebp - 0x14]
mov edi, 0x3a
push eax
lea ebx, [edi - 0x39]
lea eax, [ebp + 0xa8]
mov dword [ebp - 0x14], edi
call fcn.00404920
cmp eax, 0xffffffff
je 0x402396
lea ecx, [ebp - 0x14]
push ecx
lea eax, [ebp + 0xa8]
mov dword [ebp - 0x14], edi
call fcn.00404920
lea edx, [eax + 1]
lea eax, [ebp + 0xa8]
push eax
or ecx, 0xffffffff
lea esi, [ebp + 0x70]
call fcn.00403990
mov esi, 8
cmp dword [eax + 0x18], esi
jb 0x40231f
mov eax, dword [eax + 4]
jmp 0x402322
add eax, 4
push eax
call fcn.0040a670
movzx ecx, ax
add esp, 4
mov dword [ebp - 0x1c], ecx
cmp dword [ebp + 0x88], esi
jb 0x402345
mov edx, dword [ebp + 0x74]
push edx
call fcn.0040a02d
add esp, 4
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp + 0xa8]
mov dword [ebp - 0x14], edi
call fcn.00404920
lea ecx, [ebp + 0xa8]
push ecx
mov ecx, eax
xor edx, edx
lea esi, [ebp + 0x70]
call fcn.00403990
push 0xffffffffffffffff
push 0
lea ecx, [ebp + 0xa8]
mov byte [ebp - 4], 6
call fcn.004047c0
mov byte [ebp - 4], 3
cmp dword [ebp + 0x88], 8
jb 0x402396
mov edx, dword [ebp + 0x74]
push edx
call fcn.0040a02d
add esp, 4
xor esi, esi
mov edi, 8
cmp dword [ebp + 0xbc], esi
jne 0x40240a
cmp dword [ebp + 0xa4], edi
jb 0x4023bc
mov eax, dword [ebp + 0x90]
push eax
call fcn.0040a02d
add esp, 4
xor ecx, ecx
mov ebx, 7
mov dword [ebp + 0xa4], ebx
mov dword [ebp + 0xa0], esi
mov word [ebp + 0x90], cx
cmp dword [ebp + 0xc0], edi
jb 0x4023ed
mov edx, dword [ebp + 0xac]
push edx
call fcn.0040a02d
add esp, 4
xor eax, eax
cmp dword [ebp + 0x6c], edi
mov dword [ebp + 0xc0], ebx
mov dword [ebp + 0xbc], esi
mov word [ebp + 0xac], ax
jmp 0x402147
lea edx, [ebp - 0x4c]
push edx
call fcn.004039c0
mov byte [ebp - 4], 7
mov eax, dword [ebp + 0xac]
cmp dword [ebp + 0xc0], edi
jae 0x40242b
lea eax, [ebp + 0xac]
push eax
push str.Host
lea ecx, [ebp - 0x4c]
call fcn.00401e00
add esp, 8
lea eax, [ebp - 0xfc]
push eax
call fcn.00403b50
mov ecx, dword [ebp - 0x28]
mov byte [ebp - 4], 8
mov eax, dword [ecx + 0x14]
push eax
lea edx, [ebp - 0xfc]
push edx
call fcn.00403410
lea ecx, [ebp + 0x70]
lea eax, [ebp - 0xfc]
call fcn.00403c60
mov byte [ebp - 4], 9
cmp dword [eax + 0x18], edi
jb 0x40247b
mov eax, dword [eax + 4]
jmp 0x40247e
add eax, 4
push eax
push str.Content_Length
lea ecx, [ebp - 0x4c]
call fcn.00401e00
add esp, 8
mov byte [ebp - 4], 8
cmp dword [ebp + 0x88], edi
jb 0x4024a7
mov eax, dword [ebp + 0x74]
push eax
call fcn.0040a02d
add esp, 4
push str.close
push str.Connection
lea ecx, [ebp - 0x4c]
call fcn.00401e00
add esp, 8
push esi
push esi
push esi
push esi
push esi
call dword [sym.imp.WININET.dll_InternetOpenW]
mov ebx, eax
mov dword [ebp - 0x50], ebx
cmp ebx, esi
jne 0x402575
lea ecx, [ebp - 0xb0]
mov byte [ebp - 4], 7
call fcn.00403bf0
lea ecx, [ebp - 0xb0]
push ecx
mov dword [ebp - 0xb0], vtable.std::ios_base.0
call fcn.00409e42
add esp, 4
lea esi, [ebp - 0x4c]
call fcn.00403a20
cmp dword [ebp + 0xa4], edi
jb 0x40251b
mov edx, dword [ebp + 0x90]
push edx
call fcn.0040a02d
add esp, 4
xor esi, esi
xor eax, eax
mov ebx, 7
mov dword [ebp + 0xa4], ebx
mov dword [ebp + 0xa0], esi
mov word [ebp + 0x90], ax
cmp dword [ebp + 0xc0], edi
jb 0x40254e
mov ecx, dword [ebp + 0xac]
push ecx
call fcn.0040a02d
add esp, 4
xor edx, edx
mov dword [ebp + 0xc0], ebx
mov dword [ebp + 0xbc], esi
mov word [ebp + 0xac], dx
cmp dword [ebp + 0x6c], edi
jb 0x402155
mov eax, dword [ebp + 0x58]
push eax
jmp 0x40214d
lea ecx, [ebp - 0x58]
push ecx
lea edx, [ebp - 0x24]
push edx
push 0x32
push ebx
mov dword [ebp - 0x58], edi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], esi
call dword [sym.imp.WININET.dll_InternetQueryOptionW]
test eax, eax
je 0x4025ae
mov eax, 1
test byte [ebp - 0x24], al
jne 0x4025ae
push edi
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
push eax
push 0x32
push ebx
call dword [sym.imp.WININET.dll_InternetSetOptionW]
mov eax, dword [ebp + 0xac]
cmp dword [ebp + 0xc0], edi
jae 0x4025c2
lea eax, [ebp + 0xac]
mov ecx, dword [ebp - 0x1c]
push 0
push 0
push 3
push 0
push 0
push ecx
push eax
push ebx
call dword [sym.imp.WININET.dll_InternetConnectW]
mov edi, eax
mov dword [ebp - 0x54], edi
test edi, edi
jne 0x40263b
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea ecx, [ebp - 0xb0]
mov byte [ebp - 4], 7
call fcn.00403bf0
lea edx, [ebp - 0xb0]
push edx
mov dword [ebp - 0xb0], vtable.std::ios_base.0
call fcn.00409e42
add esp, 4
lea esi, [ebp - 0x4c]
call fcn.00403a20
lea esi, [ebp + 0x8c]
call fcn.004038d0
lea esi, [ebp + 0xa8]
call fcn.004038d0
lea esi, [ebp + 0x54]
call fcn.004038d0
jmp 0x402155
push 0
call dword [sym.imp.WININET.dll_InternetAttemptConnect]
test eax, eax
je 0x402664
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push edi
call esi
push ebx
call esi
lea eax, [ebp - 0xfc]
mov byte [ebp - 4], 7
call fcn.00402980
jmp 0x402610
cmp dword [ebp + 0xa0], 0
mov dword [ebp - 0x60], 0x429058
mov dword [ebp - 0x5c], 0
jbe 0x402694
cmp dword [ebp + 0xa4], 8
jb 0x40268c
mov eax, dword [ebp + 0x90]
jmp 0x402696
lea eax, [ebp + 0x90]
jmp 0x402696
xor eax, eax
push 0
push 0x84400000
lea ecx, [ebp - 0x60]
push ecx
push 0
push str.HTTP_1.1
push eax
push 0x429074
push edi
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov esi, eax
mov dword [ebp - 0x14], esi
test esi, esi
je 0x402647
mov dword [ebp - 0x1c], 0
mov ecx, dword [ebp - 0x3c]
sub ecx, dword [ebp - 0x40]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [ebp - 0x1c], eax
jae 0x4027c2
mov edi, dword [ebp - 0x1c]
lea esi, [ebp - 0x4c]
call fcn.00403a70
push eax
mov ebx, 0x429084
lea esi, [ebp - 0x118]
call fcn.004077c0
add esp, 4
mov ebx, eax
lea esi, [ebp - 0x4c]
mov byte [ebp - 4], 0xa
call fcn.00403a70
add eax, 0x1c
push eax
push ebx
lea edi, [ebp - 0x7c]
call fcn.00407880
add esp, 8
push eax
mov ebx, 0x42907c
lea esi, [ebp + 0x70]
mov byte [ebp - 4], 0xb
call fcn.004077c0
mov ebx, 8
add esp, 4
cmp dword [ebp - 0x64], ebx
jb 0x40274f
mov ecx, dword [ebp - 0x78]
push ecx
call fcn.0040a02d
add esp, 4
xor edx, edx
mov byte [ebp - 4], bl
mov dword [ebp - 0x64], 7
mov dword [ebp - 0x68], 0
mov word [ebp - 0x78], dx
cmp dword [ebp - 0x100], ebx
jb 0x40277d
mov eax, dword [ebp - 0x114]
push eax
call fcn.0040a02d
add esp, 4
mov eax, dword [ebp + 0x74]
cmp dword [ebp + 0x88], ebx
jae 0x40278b
lea eax, [ebp + 0x74]
mov ecx, dword [ebp - 0x14]
push 0x20000000
push 0xffffffffffffffff
push eax
push ecx
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersW]
cmp dword [ebp + 0x88], ebx
jb 0x4027b1
mov edx, dword [ebp + 0x74]
push edx
call fcn.0040a02d
add esp, 4
inc dword [ebp - 0x1c]
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x54]
mov ebx, dword [ebp - 0x50]
jmp 0x4026c5
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x4027e3
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
jmp 0x40264d
xor eax, eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x18]
push ecx
lea edx, [ebp - 0x2c]
push edx
push 0x20000013
push esi
mov dword [ebp - 0x18], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x4027d5
cmp dword [ebp - 0x2c], 0xc8
jne 0x4027d5
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x18]
push ecx
lea edx, [ebp - 0x30]
push edx
push 0x20000005
push esi
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp + 0x50], 0xf
mov dword [ebp + 0x4c], eax
mov byte [ebp + 0x3c], al
lea ecx, [ebp + 0x38]
mov byte [ebp - 4], 0xc
call fcn.004033d0
cmp dword [ebp + 0x50], 0x10
mov eax, dword [ebp + 0x3c]
mov dword [ebp - 0x18], 0x18fff
jae 0x402863
lea eax, [ebp + 0x3c]
push 0
lea ecx, [ebp - 0x18]
push ecx
push eax
push 0x16
push esi
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
cmp dword [ebp + 0x50], 0x10
mov eax, dword [ebp + 0x3c]
jae 0x40287f
lea eax, [ebp + 0x3c]
mov ecx, dword [ebp - 0x18]
push eax
shr ecx, 1
lea eax, [ebp]
call fcn.004038a0
xor eax, eax
mov dword [ebp + 0x34], 0xf
mov dword [ebp + 0x30], eax
mov byte [ebp + 0x20], al
mov byte [ebp - 4], 0xe
mov dword [ebp - 0x18], eax
lea edx, [ebp - 0x18]
push edx
push 0x19000
lea eax, [ebp + 0xc4]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x4028d7
mov eax, dword [ebp - 0x18]
test eax, eax
jbe 0x4028d7
push eax
lea ecx, [ebp + 0xc4]
push ecx
lea eax, [ebp + 0x1c]
call fcn.00403220
jmp 0x4028a3
mov ecx, dword [ebp - 0x28]
push 0xffffffffffffffff
push 0
lea edx, [ebp + 0x1c]
push edx
call fcn.00404470
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push edi
call esi
push ebx
call esi
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp + 0x30]
lea ecx, [ebp + 0x1c]
sete bl
call fcn.004031f0
lea esi, [ebp]
call fcn.004038d0
lea ecx, [ebp + 0x38]
call fcn.004031f0
lea ecx, [ebp - 0xb0]
mov byte [ebp - 4], 7
call fcn.00403bf0
lea ecx, [ebp - 0xb0]
push ecx
mov dword [ebp - 0xb0], vtable.std::ios_base.0
call fcn.00409e42
add esp, 4
lea esi, [ebp - 0x4c]
call fcn.00403a20
lea esi, [ebp + 0x8c]
call fcn.004038d0
lea esi, [ebp + 0xa8]
call fcn.004038d0
lea esi, [ebp + 0x54]
call fcn.004038d0
mov al, bl
jmp 0x402157