Function at 0x476b8c
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
mov ebp, esp
push ecx
mov ecx, 0x516
push 0
push 0
dec ecx
jne 0x476b95
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov dword [ebp - 0x10], ecx
mov byte [ebp - 9], dl
mov esi, eax
xor eax, eax
push ebp
push 0x4775d9
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 0x2880]
mov eax, esi
call fcn.0040984c
mov edx, dword [ebp - 0x2880]
mov eax, 0x4775f4
call fcn.004056bc
dec eax
jne 0x476bf4
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x10]
mov dl, byte [ebp - 9]
mov eax, esi
call fcn.00477940
mov ebx, eax
jmp 0x47759e
mov eax, dword [ebp - 0x10]
call fcn.004050b8
mov bl, 4
xor eax, eax
mov dword [ebp - 0x58], eax
cmp byte [0x4dbb2c], 0
je 0x476c1f
push 0
lea eax, [ebp - 0x34]
push eax
call sub.wininet.dll_InternetGetConnectedState
test eax, eax
je 0x47759e
mov eax, dword [ebp + 8]
cmp dword [eax + 0xc], 0
je 0x476c38
lea eax, [ebp - 0x60]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 0xc]
call fcn.00405150
jmp 0x476c46
lea eax, [ebp - 0x60]
mov edx, dword [0x4dbb30]
call fcn.00405150
lea eax, [ebp - 0x4c]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 0x18]
call fcn.00405150
mov eax, dword [ebp + 8]
cmp byte [eax + 0x10], 0
je 0x476c9f
lea edx, [ebp - 0x2884]
mov eax, dword [ebp - 0x4c]
call fcn.0040984c
mov edx, dword [ebp - 0x2884]
mov eax, 0x477604
call fcn.004056bc
test eax, eax
jne 0x476c9f
cmp dword [ebp - 0x4c], 0
je 0x476c92
lea eax, [ebp - 0x4c]
mov edx, 0x47761c
call fcn.00405380
lea eax, [ebp - 0x4c]
mov edx, 0x477628
call fcn.00405380
mov eax, dword [ebp + 8]
cmp byte [eax + 0x10], 0
je 0x476cb8
lea eax, [ebp - 0x50]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 0x14]
call fcn.00405150
jmp 0x476cc0
lea eax, [ebp - 0x50]
call fcn.004050b8
mov eax, dword [0x4df158]
sub eax, 1
jb 0x476cdb
je 0x476cf9
dec eax
je 0x476d17
dec eax
je 0x476d81
jmp 0x476d9c
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 0x60]
call fcn.00405578
push eax
call sub.wininet.dll_InternetOpenA
mov dword [ebp - 0x14], eax
jmp 0x476da1
push 0
push 0
push 0
push 1
mov eax, dword [ebp - 0x60]
call fcn.00405578
push eax
call sub.wininet.dll_InternetOpenA
mov dword [ebp - 0x14], eax
jmp 0x476da1
push dword [0x4df15c]
push 0x477660
lea edx, [ebp - 0x2888]
mov eax, dword [0x4df160]
call fcn.00409d50
push dword [ebp - 0x2888]
lea eax, [ebp - 0x2c]
mov edx, 3
call fcn.00405438
push 0
lea edx, [ebp - 0x288c]
mov eax, dword [0x4df170]
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov eax, dword [ebp - 0x288c]
call fcn.00405578
push eax
mov eax, dword [ebp - 0x2c]
call fcn.00405578
push eax
push 3
mov eax, dword [ebp - 0x60]
call fcn.00405578
push eax
call sub.wininet.dll_InternetOpenA
mov dword [ebp - 0x14], eax
jmp 0x476da1
push 0
push 0
push 0
push 4
mov eax, dword [ebp - 0x60]
call fcn.00405578
push eax
call sub.wininet.dll_InternetOpenA
mov dword [ebp - 0x14], eax
jmp 0x476da1
xor eax, eax
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x47759e
mov bl, 2
mov eax, dword [ebp + 8]
cmp dword [eax], 0
jle 0x476de8
push 4
mov eax, dword [ebp + 8]
push eax
push 2
mov eax, dword [ebp - 0x14]
push eax
call sub.wininet.dll_InternetSetOptionA
push 4
mov eax, dword [ebp + 8]
push eax
push 5
mov eax, dword [ebp - 0x14]
push eax
call sub.wininet.dll_InternetSetOptionA
push 4
mov eax, dword [ebp + 8]
push eax
push 6
mov eax, dword [ebp - 0x14]
push eax
call sub.wininet.dll_InternetSetOptionA
xor edi, edi
mov eax, dword [ebp + 8]
cmp byte [eax + 7], 0
je 0x476df9
or edi, 0x1000
mov eax, dword [ebp + 8]
cmp byte [eax + 8], 0
je 0x476e08
or edi, 0x2000
mov eax, dword [ebp + 8]
cmp byte [eax + 9], 0
je 0x476e17
or edi, 0x800000
xor eax, eax
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 8]
cmp byte [eax + 5], 0
je 0x476e4c
lea edx, [ebp - 0x2890]
mov eax, esi
call fcn.0040984c
mov edx, dword [ebp - 0x2890]
mov eax, 0x47766c
call fcn.004056bc
dec eax
jne 0x476e4c
mov dword [ebp - 0x28], 0x8000000
call fcn.0040c0bc
fstp qword [ebp - 8]
wait
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x40]
lea edx, [ebp - 0x3c]
mov eax, esi
call fcn.0046c1e8
lea edx, [ebp - 0x2894]
mov eax, dword [ebp - 0x40]
call fcn.004690ec
mov edx, dword [ebp - 0x2894]
lea eax, [ebp - 0x40]
call fcn.00405150
lea edx, [ebp - 0x2898]
mov eax, dword [ebp - 0x44]
call fcn.004690ec
mov edx, dword [ebp - 0x2898]
lea eax, [ebp - 0x44]
call fcn.00405150
mov eax, dword [ebp + 8]
cmp dword [eax + 0x20], 0
jne 0x476eb8
mov eax, dword [ebp + 8]
cmp dword [eax + 0x24], 0
je 0x476ed4
lea eax, [ebp - 0x40]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 0x20]
call fcn.00405150
lea eax, [ebp - 0x44]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 0x24]
call fcn.00405150
cmp dword [0x4df158], 2
sete al
and al, byte [0x4df164]
jne 0x476f11
mov eax, dword [ebp + 8]
cmp byte [eax + 6], 0
jne 0x476f11
mov eax, dword [ebp + 8]
cmp byte [eax + 0x10], 0
jne 0x476f11
mov eax, dword [ebp + 8]
cmp dword [eax + 0x1c], 0
jne 0x476f11
cmp dword [ebp - 0x40], 0
jne 0x476f11
cmp dword [ebp - 0x44], 0
je 0x477369
lea edx, [ebp - 0x289c]
mov eax, esi
call fcn.0040984c
mov edx, dword [ebp - 0x289c]
mov eax, 0x47766c
call fcn.004056bc
dec eax
je 0x477369
lea edx, [ebp - 0x28a0]
mov eax, esi
call fcn.0040984c
mov edx, dword [ebp - 0x28a0]
mov eax, 0x47767c
call fcn.004056bc
dec eax
je 0x477369
mov eax, dword [ebp + 8]
cmp byte [eax + 9], 0
jne 0x476f89
lea edx, [ebp - 0x28a4]
mov eax, esi
call fcn.0040984c
mov edx, dword [ebp - 0x28a4]
mov eax, 0x47768c
call fcn.004056bc
test eax, eax
je 0x476f89
or edi, 0x800000
cmp dword [ebp - 0x48], 0
je 0x476fac
mov eax, dword [ebp - 0x48]
mov al, byte [eax]
sub al, 0x2f
je 0x476fac
sub al, 0x2d
je 0x476fac
lea eax, [ebp - 0x48]
mov ecx, dword [ebp - 0x48]
mov edx, 0x4776a0
call fcn.004053c4
push 0
push 0
push 3
mov eax, dword [ebp - 0x44]
call fcn.00405578
push eax
mov eax, dword [ebp - 0x40]
call fcn.00405578
push eax
mov ax, word [ebp - 0x54]
push eax
mov eax, dword [ebp - 0x3c]
call fcn.00405578
push eax
mov eax, dword [ebp - 0x14]
push eax
call sub.wininet.dll_InternetConnectA
mov dword [ebp - 0x58], eax
mov eax, dword [ebp + 8]
cmp byte [eax + 0x10], 0
jne 0x477012
push 0
add edi, 0x80400000
push edi
push 0
push 0
push 0
mov eax, dword [ebp - 0x48]
call fcn.00405578
push eax
push 0x4776a4
mov eax, dword [ebp - 0x58]
push eax
call sub.wininet.dll_HttpOpenRequestA
mov dword [ebp - 0x18], eax
jmp 0x47703b
push 0
add edi, 0x80400000
push edi
push 0
push 0
push 0
mov eax, dword [ebp - 0x48]
call fcn.00405578
push eax
push 0x4776a8
mov eax, dword [ebp - 0x58]
push eax
call sub.wininet.dll_HttpOpenRequestA
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x47739b
mov eax, dword [ebp - 0x50]
call fcn.00405378
push eax
mov eax, dword [ebp - 0x50]
call fcn.00405578
push eax
mov eax, dword [ebp - 0x4c]
call fcn.00405378
push eax
mov eax, dword [ebp - 0x4c]
call fcn.00405578
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.wininet.dll_HttpSendRequestA
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x59], al
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0x64], eax
cmp byte [ebp - 0x59], 0
jne 0x47710f
cmp dword [ebp - 0x64], 0x2f0d
jne 0x47710f
mov eax, dword [ebp + 8]
cmp byte [eax + 6], 0
je 0x47710f
mov dword [ebp - 0x38], 4
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x34]
push eax
push 0x1f
mov eax, dword [ebp - 0x18]
push eax
call sub.wininet.dll_InternetQueryOptionA
or dword [ebp - 0x34], 0x100
push 4
lea eax, [ebp - 0x34]
push eax
push 0x1f
mov eax, dword [ebp - 0x18]
push eax
call sub.wininet.dll_InternetSetOptionA
mov eax, dword [ebp - 0x50]
call fcn.00405378
push eax
mov eax, dword [ebp - 0x50]
call fcn.00405578
push eax
mov eax, dword [ebp - 0x4c]
call fcn.00405378
push eax
mov eax, dword [ebp - 0x4c]
call fcn.00405578
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.wininet.dll_HttpSendRequestA
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x59], al
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0x64], eax
cmp byte [ebp - 0x59], 0
jne 0x47718e
cmp dword [ebp - 0x64], 0x2f19
jne 0x47718e
mov dword [ebp - 0x38], 4
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x34]
push eax
push 0x1f
mov eax, dword [ebp - 0x18]
push eax
call sub.wininet.dll_InternetQueryOptionA
or dword [ebp - 0x34], 0x80
push 4
lea eax, [ebp - 0x34]
push eax
push 0x1f
mov eax, dword [ebp - 0x18]
push eax
call sub.wininet.dll_InternetSetOptionA
mov eax, dword [ebp - 0x50]
call fcn.00405378
push eax
mov eax, dword [ebp - 0x50]
call fcn.00405578
push eax
mov eax, dword [ebp - 0x4c]
call fcn.00405378
push eax
mov eax, dword [ebp - 0x4c]
call fcn.00405578
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.wininet.dll_HttpSendRequestA
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x59], al
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0x64], eax
cmp byte [ebp - 0x59], 0
jne 0x477270
cmp dword [ebp - 0x64], 0x2f0c
jne 0x477270
xor eax, eax
mov dword [ebp - 0x64], eax
mov eax, dword [ebp + 8]
cmp dword [eax + 0x1c], 0
je 0x47722b
mov al, byte [0x4dbb40]
push eax
lea ecx, [ebp - 0x64]
mov edx, dword [ebp + 8]
mov edx, dword [edx + 0x1c]
mov eax, 0x4776b8
call fcn.00474210
mov dword [ebp - 0x68], eax
cmp dword [ebp - 0x68], 0
je 0x477270
push 0x14
mov eax, dword [ebp - 0x68]
push eax
push 0x54
mov eax, dword [ebp - 0x18]
push eax
call sub.wininet.dll_InternetSetOptionA
mov eax, dword [ebp - 0x50]
call fcn.00405378
push eax
mov eax, dword [ebp - 0x50]
call fcn.00405578
push eax
mov eax, dword [ebp - 0x4c]
call fcn.00405378
push eax
mov eax, dword [ebp - 0x4c]
call fcn.00405578
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.wininet.dll_HttpSendRequestA
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x59], al
mov eax, dword [ebp - 0x68]
push eax
call sub.crypt32.dll_CertFreeCertificateContext
jmp 0x477270
push 0
push 0
push 0x54
mov eax, dword [ebp - 0x18]
push eax
call sub.wininet.dll_InternetSetOptionA
mov eax, dword [ebp - 0x50]
call fcn.00405378
push eax
mov eax, dword [ebp - 0x50]
call fcn.00405578
push eax
mov eax, dword [ebp - 0x4c]
call fcn.00405378
push eax
mov eax, dword [ebp - 0x4c]
call fcn.00405578
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.wininet.dll_HttpSendRequestA
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x59], al
cmp byte [ebp - 0x59], 0
je 0x477359
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], 4
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x38]
push eax
push 0x20000013
mov eax, dword [ebp - 0x18]
push eax
call sub.wininet.dll_HttpQueryInfoA
cmp dword [ebp - 0x38], 0x191
je 0x4772b6
cmp dword [ebp - 0x38], 0x197
jne 0x47739b
lea eax, [ebp - 0x20]
push eax
push 0x2800
lea eax, [ebp - 0x287c]
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.wininet.dll_InternetReadFile
test eax, eax
je 0x4772d9
cmp dword [ebp - 0x20], 0
ja 0x4772b6
mov eax, dword [0x4df168]
call fcn.00405378
inc eax
push eax
mov eax, dword [0x4df168]
call fcn.00405578
push eax
push 0x2b
mov eax, dword [ebp - 0x18]
push eax
call sub.wininet.dll_InternetSetOptionA
test eax, eax
je 0x477321
mov eax, dword [0x4df16c]
call fcn.00405378
inc eax
push eax
mov eax, dword [0x4df16c]
call fcn.00405578
push eax
push 0x2c
mov eax, dword [ebp - 0x18]
push eax
call sub.wininet.dll_InternetSetOptionA
call fcn.0040c0bc
fstp qword [ebp - 8]
wait
mov eax, dword [ebp - 0x50]
call fcn.00405378
push eax
mov eax, dword [ebp - 0x50]
call fcn.00405578
push eax
mov eax, dword [ebp - 0x4c]
call fcn.00405378
push eax
mov eax, dword [ebp - 0x4c]
call fcn.00405578
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.wininet.dll_HttpSendRequestA
jmp 0x47739b
mov eax, dword [ebp - 0x18]
push eax
call sub.wininet.dll_InternetCloseHandle
xor eax, eax
mov dword [ebp - 0x18], eax
jmp 0x47739b
push 0
add edi, 0x80000000
add edi, dword [ebp - 0x28]
push edi
mov eax, dword [ebp - 0x4c]
call fcn.00405378
push eax
mov eax, dword [ebp - 0x4c]
call fcn.00405578
push eax
mov eax, esi
call fcn.00405578
push eax
mov eax, dword [ebp - 0x14]
push eax
call sub.wininet.dll_InternetOpenUrlA
mov dword [ebp - 0x18], eax
push ebp
call fcn.00476b24
pop ecx
test al, al
je 0x477586
cmp dword [ebp - 0x18], 0
je 0x477586
lea edx, [ebp - 0x28a8]
mov eax, esi
call fcn.0040984c
mov edx, dword [ebp - 0x28a8]
mov eax, 0x47766c
call fcn.004056bc
dec eax
je 0x4774aa
lea edx, [ebp - 0x28ac]
mov eax, esi
call fcn.0040984c
mov edx, dword [ebp - 0x28ac]
mov eax, 0x47767c
call fcn.004056bc
dec eax
je 0x4774aa
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], 0xa
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x7c]
push eax
push 0x13
mov eax, dword [ebp - 0x18]
push eax
call sub.wininet.dll_HttpQueryInfoA
lea eax, [ebp - 0x7c]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x28b0]
mov edx, dword [ebp - 0x30]
call fcn.004052b0
mov eax, dword [ebp - 0x28b0]
mov edx, 0x4776c4
call fcn.004054c4
je 0x47746e
mov eax, dword [ebp + 8]
cmp byte [eax + 4], 0
je 0x477472
lea eax, [ebp - 0x28b4]
mov edx, dword [ebp - 0x30]
call fcn.004052b0
mov eax, dword [ebp - 0x28b4]
mov edx, 0x4776d0
call fcn.004054c4
jne 0x477472
mov bl, 1
jmp 0x477474
mov bl, 8
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], 0x2800
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x287c]
push eax
push 0x16
mov eax, dword [ebp - 0x18]
push eax
call sub.wininet.dll_HttpQueryInfoA
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 0x287c]
call fcn.004052b0
jmp 0x4774ac
mov bl, 1
cmp byte [ebp - 9], 0
je 0x47757d
cmp bl, 1
jne 0x47757d
mov dword [ebp - 0x20], 4
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x24]
push eax
push 0x20000005
mov eax, dword [ebp - 0x18]
push eax
call sub.wininet.dll_HttpQueryInfoA
test eax, eax
je 0x47750b
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x24]
call fcn.00405704
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp + 0xc]
call fcn.004055d0
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.wininet.dll_InternetReadFile
jmp 0x47757d
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0x20], 1
xor eax, eax
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x20], 0
je 0x477572
push ebp
call fcn.00476b24
pop ecx
test al, al
je 0x477572
mov edx, dword [ebp - 0x24]
add edx, 0x400
mov eax, dword [ebp + 0xc]
call fcn.00405704
lea eax, [ebp - 0x20]
push eax
push 0x400
mov eax, dword [ebp + 0xc]
call fcn.004055d0
mov edx, dword [ebp - 0x24]
add eax, edx
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.wininet.dll_InternetReadFile
test eax, eax
jne 0x477566
mov bl, 8
jmp 0x477572
mov eax, dword [ebp - 0x20]
add dword [ebp - 0x24], eax
cmp dword [ebp - 0x20], 0
jne 0x477522
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x24]
call fcn.00405704
mov eax, dword [ebp - 0x18]
push eax
call sub.wininet.dll_InternetCloseHandle
cmp dword [ebp - 0x58], 0
je 0x477595
mov eax, dword [ebp - 0x58]
push eax
call sub.wininet.dll_InternetCloseHandle
mov eax, dword [ebp - 0x14]
push eax
call sub.wininet.dll_InternetCloseHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4775e0
lea eax, [ebp - 0x28b4]
mov edx, 0xe
call fcn.004050dc
lea eax, [ebp - 0x60]
call fcn.004050b8
lea eax, [ebp - 0x50]
mov edx, 6
call fcn.004050dc
lea eax, [ebp - 0x2c]
call fcn.004050b8
ret