Function at 0x10007e90
Capabilities:
Check http status code
Initialize winhttp library
Prepare http request
Read http header
Receive http response

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1003c0b6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x8a8
push ebx
mov ebx, dword [ebp + 0x30]
lea eax, [ebp - 0x29c]
push esi
push edi
push eax
mov esi, edx
mov dword [ebp - 0x24], 0
mov edi, ecx
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x29c], 0x11c
call dword [sym.imp.ntdll.dll_RtlGetVersion]
mov eax, dword [ebp + 0x28]
mov dword [eax], 0
cmp dword [esi + 0x14], 0x10
jb 0x10007f0a
mov esi, dword [esi]
push esi
lea ecx, [ebp - 0x3a0]
call fcn.10008aa0
push 0
push 0
push 0
push 0
push dword [eax]
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ecx, dword [ebp - 0x3a0]
mov esi, eax
lea eax, [ebp - 0x39c]
mov dword [ebp - 0x3c], esi
cmp ecx, eax
je 0x10007f44
push ecx
call fcn.10024f30
add esp, 4
test esi, esi
je 0x100087b1
mov eax, dword [ebp + 8]
cmp dword [eax + 0x14], 0x10
jb 0x10007f57
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x4a4]
call fcn.10008aa0
push 0
push dword [ebp + 0x10]
push dword [eax]
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ecx, dword [ebp - 0x4a4]
lea edx, [ebp - 0x4a0]
mov dword [ebp - 0x30], eax
cmp ecx, edx
je 0x10007f90
push ecx
call fcn.10024f30
mov eax, dword [ebp - 0x30]
add esp, 4
test eax, eax
je 0x100087a1
mov bl, byte [ebp + 0x14]
mov eax, dword [ebp + 0xc]
movzx esi, bl
shl esi, 0x17
cmp dword [eax + 0x14], 0x10
jb 0x10007fac
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x6ac]
call fcn.10008aa0
mov dword [ebp - 4], 0
cmp dword [edi + 0x14], 0x10
mov eax, dword [eax]
mov dword [ebp - 0x1c], eax
jb 0x10007fcc
mov edi, dword [edi]
push edi
lea ecx, [ebp - 0x5a8]
call fcn.10008aa0
or esi, 0x100
push esi
push 0
push 0
push 0
push dword [ebp - 0x1c]
push dword [eax]
push dword [ebp - 0x30]
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov ecx, dword [ebp - 0x5a8]
mov esi, eax
lea eax, [ebp - 0x5a4]
mov dword [ebp - 0x14], esi
cmp ecx, eax
je 0x10008011
push ecx
call fcn.10024f30
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6a8]
mov eax, dword [ebp - 0x6ac]
cmp eax, ecx
je 0x10008031
push eax
call fcn.10024f30
add esp, 4
test bl, bl
je 0x10008069
push 4
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0x3100
push eax
push 0x1f
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
mov ebx, eax
test ebx, ebx
jne 0x1000806b
push dword [ebp - 0x3c]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov ecx, dword [ebp + 0x30]
push 0x39
push str.Error_in_WinHttpQueryOption_WINHTTP_OPTION_SECURITY_FLAGS
jmp 0x100087ba
xor ebx, ebx
test esi, esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
je 0x10008781
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x10008146
mov ecx, dword [ebp + 0x34]
cmp dword [ecx + 0x14], 0x10
jb 0x10008096
mov eax, dword [ecx]
cmp dword [ecx + 0x10], 0
jne 0x100080a2
xor eax, eax
mov al, 1
jmp 0x100080a4
xor al, al
test al, al
jne 0x10008146
mov ecx, dword [ebp + 0x38]
mov eax, ecx
cmp dword [ecx + 0x14], 0x10
jb 0x100080b9
mov eax, dword [ecx]
push eax
lea ecx, [ebp - 0x180]
call fcn.10008aa0
mov ecx, dword [ebp + 0x34]
mov dword [ebp - 4], 1
mov esi, dword [eax]
mov eax, ecx
cmp dword [ecx + 0x14], 0x10
jb 0x100080db
mov eax, dword [ecx]
push eax
lea ecx, [ebp - 0x7b0]
call fcn.10008aa0
push 0
push esi
push dword [eax]
push ebx
push 1
push dword [ebp - 0x14]
call dword [sym.imp.WINHTTP.dll_WinHttpSetCredentials]
mov ecx, dword [ebp - 0x7b0]
mov esi, eax
lea eax, [ebp - 0x7ac]
cmp ecx, eax
je 0x10008113
push ecx
call fcn.10024f30
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x17c]
mov eax, dword [ebp - 0x180]
cmp eax, ecx
je 0x10008133
push eax
call fcn.10024f30
add esp, 4
test esi, esi
jne 0x10008146
mov ecx, dword [ebp + 0x30]
push 0x1c
push str.WinHttpSetCredentials_fails_
call fcn.10001d00
mov eax, dword [ebp + 0x18]
mov edx, dword [ebp + 0x1c]
mov ebx, dword [eax + 0x10]
mov esi, dword [edx + 0x10]
mov ecx, dword [edx + 0x14]
test ebx, ebx
jne 0x10008179
mov eax, edx
cmp ecx, 0x10
jb 0x10008162
mov eax, dword [edx]
push 0
push esi
push esi
mov esi, dword [ebp - 0x14]
push eax
push 0
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov ebx, eax
jmp 0x100081cb
mov edi, edx
cmp ecx, 0x10
jb 0x10008182
mov edi, dword [edx]
mov ecx, eax
cmp dword [ecx + 0x14], 0x10
jb 0x1000818c
mov eax, dword [ecx]
push eax
lea ecx, [ebp - 0x180]
call fcn.10008aa0
push 0
push esi
push esi
mov esi, dword [ebp - 0x14]
push edi
push ebx
push dword [eax]
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov ebx, eax
lea ecx, [ebp - 0x17c]
mov eax, dword [ebp - 0x180]
cmp eax, ecx
je 0x100081c5
push eax
call fcn.10024f30
add esp, 4
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
jne 0x100081d9
mov eax, str.WinHttpSendRequest_fails_
lea edx, [ebx + 0x19]
jmp 0x100081f2
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov ebx, eax
test ebx, ebx
jne 0x10008211
mov eax, str.WinHttpReceiveResponse_fails_
mov edx, 0x1d
mov ecx, dword [ebp + 0x30]
push edx
push eax
call fcn.10001d00
call edi
cmp eax, 0x2f00
je 0x10008080
test ebx, ebx
je 0x10008761
push 0
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 4
push eax
push dword [ebp + 0x28]
push 0
push 0x20000013
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov ebx, eax
mov dword [ebp - 0x1c], ebx
test ebx, ebx
jne 0x10008247
mov ecx, dword [ebp + 0x30]
push 0x1a
push str.WinHttpQueryHeaders_fails_
call fcn.10001d00
push 0
lea eax, [ebp - 0x10]
push eax
push 0
push 0
push 0x16
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
call edi
cmp eax, 0x7a
jne 0x100082ea
mov ebx, dword [ebp + 0x24]
mov ecx, dword [ebp - 0x10]
inc ecx
mov esi, dword [ebx + 0x10]
mov edx, dword [ebx + 0x14]
cmp ecx, esi
ja 0x10008288
mov eax, ebx
cmp edx, 0x10
jb 0x1000827f
mov eax, dword [ebx]
mov dword [ebx + 0x10], ecx
mov byte [eax + ecx], 0
jmp 0x100082c6
mov edi, ecx
mov eax, edx
sub edi, esi
sub eax, esi
cmp edi, eax
ja 0x100082b4
mov dword [ebx + 0x10], ecx
mov eax, ebx
cmp edx, 0x10
jb 0x100082a0
mov eax, dword [ebx]
push edi
add esi, eax
push 0
push esi
call fcn.1001cf50
add esp, 0xc
mov byte [esi + edi], 0
jmp 0x100082c6
push 0
push edi
mov byte [ebp - 0x58], 0
mov ecx, ebx
push dword [ebp - 0x58]
push edi
call fcn.10007b10
cmp dword [ebx + 0x14], 0x10
mov eax, ebx
jb 0x100082d0
mov eax, dword [ebx]
mov esi, dword [ebp - 0x14]
lea ecx, [ebp - 0x10]
push 0
push ecx
push eax
push 0
push 0x16
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov ebx, eax
mov dword [ebp - 0x1c], eax
test ebx, ebx
je 0x10008761
mov ebx, dword [ebp + 0x20]
xor edi, edi
push edi
push 0x1004cc18
mov ecx, ebx
call fcn.10001d00
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x100083d3
mov ecx, dword [ebp + 0x30]
push 0x24
push str.Error_in_WinHttpQueryDataAvailable:
call fcn.10001d00
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea esi, [ebp - 0x67]
mov eax, 0xcccccccd
dec esi
mul ebx
shr edx, 3
mov al, dl
shl al, 2
lea ecx, [eax + edx]
add cl, cl
sub bl, cl
add bl, 0x30
mov byte [esi], bl
mov ebx, edx
test ebx, ebx
jne 0x10008338
lea eax, [ebp - 0x67]
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x40], 0xf
mov byte [ebp - 0x54], dl
cmp esi, eax
je 0x1000837a
sub eax, esi
lea ecx, [ebp - 0x54]
push eax
push esi
call fcn.10001d00
or dword [ebp - 0x24], 3
mov esi, dword [ebp + 0x30]
lea eax, [ebp - 0x54]
push eax
mov ecx, esi
mov dword [ebp - 4], 2
call fcn.10003400
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x40]
cmp edx, 0x10
jb 0x100083ce
mov ecx, dword [ebp - 0x54]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x100083c4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100087d2
push edx
push ecx
call fcn.1001a1f6
add esp, 8
mov ebx, dword [ebp + 0x20]
jmp 0x100083d6
mov esi, dword [ebp + 0x30]
mov ecx, dword [ebp + 0x2c]
mov eax, dword [ebp - 0x10]
add dword [ecx], eax
test eax, eax
je 0x10008590
test edi, edi
je 0x100083f6
push edi
call fcn.10024f30
mov eax, dword [ebp - 0x10]
add esp, 4
push 1
push eax
call fcn.10024f58
add esp, 8
mov edi, eax
lea eax, [ebp - 0x5c]
mov dword [ebp - 0x34], edi
push eax
push dword [ebp - 0x10]
push edi
push dword [ebp - 0x14]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x100084f1
push 0x1a
push str.Error_in_WinHttpReadData:
mov ecx, esi
call fcn.10001d00
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea esi, [ebp - 0x67]
mov eax, 0xcccccccd
dec esi
mul ecx
shr edx, 3
mov al, dl
shl al, 2
lea ebx, [eax + edx]
add bl, bl
sub cl, bl
add cl, 0x30
mov byte [esi], cl
mov ecx, edx
test ecx, ecx
jne 0x10008438
lea eax, [ebp - 0x67]
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x40], 0xf
mov byte [ebp - 0x54], dl
cmp esi, eax
je 0x1000847a
sub eax, esi
lea ecx, [ebp - 0x54]
push eax
push esi
call fcn.10001d00
or dword [ebp - 0x24], 0xc
mov ecx, dword [ebp + 0x30]
lea eax, [ebp - 0x54]
push eax
mov dword [ebp - 4], 3
call fcn.10003400
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x40]
cmp edx, 0x10
jb 0x100084cc
mov ecx, dword [ebp - 0x54]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x100084c2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100087d2
push edx
push ecx
call fcn.1001a1f6
add esp, 8
test edi, edi
je 0x100084db
push edi
call fcn.10024f30
add esp, 4
xor edi, edi
mov ebx, dword [ebp + 0x20]
mov ecx, ebx
push 0
push 0x1004cc18
call fcn.10001d00
jmp 0x10008583
mov ecx, dword [ebp + 0x2c]
mov esi, dword [ebx + 0x10]
mov edx, dword [ebx + 0x14]
mov ecx, dword [ecx]
cmp ecx, esi
ja 0x10008512
mov eax, ebx
cmp edx, 0x10
jb 0x10008509
mov eax, dword [ebx]
mov dword [ebx + 0x10], ecx
mov byte [eax + ecx], 0
jmp 0x10008553
mov edi, ecx
mov eax, edx
sub edi, esi
sub eax, esi
cmp edi, eax
ja 0x1000853e
mov dword [ebx + 0x10], ecx
mov eax, ebx
cmp edx, 0x10
jb 0x1000852a
mov eax, dword [ebx]
push edi
add esi, eax
push 0
push esi
call fcn.1001cf50
add esp, 0xc
mov byte [edi + esi], 0
jmp 0x10008550
push 0
push edi
mov byte [ebp - 0x60], 0
mov ecx, ebx
push dword [ebp - 0x60]
push edi
call fcn.10007b10
mov edi, dword [ebp - 0x34]
cmp dword [ebx + 0x14], 0x10
mov edx, ebx
jb 0x1000855d
mov edx, dword [ebx]
mov eax, dword [ebp + 0x2c]
mov ecx, dword [eax]
mov eax, dword [ebp - 0x10]
sub ecx, eax
push eax
add ecx, edx
push edi
push ecx
call fcn.1001d110
add esp, 0xc
test edi, edi
je 0x10008583
push edi
call fcn.10024f30
add esp, 4
xor edi, edi
cmp dword [ebp - 0x10], 0
mov esi, dword [ebp - 0x14]
ja 0x10008304
mov eax, dword [ebp + 0x28]
mov esi, dword [ebp - 0x14]
mov eax, dword [eax]
sub eax, 0x191
je 0x1000863c
sub eax, 6
je 0x100085b8
mov ebx, dword [ebp - 0x1c]
mov eax, 1
mov dword [ebp - 0x18], eax
jmp 0x10008764
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryAuthSchemes]
mov ebx, eax
test ebx, ebx
jne 0x100085e2
mov ecx, dword [ebp + 0x30]
push 0x2a
push str.WinHttpQueryAuthSchemes_in_case_407_fails_
call fcn.10001d00
jmp 0x10008622
mov eax, dword [ebp - 0x28]
test al, 0x10
je 0x100085f2
mov dword [ebp - 0x20], 0x10
jmp 0x10008622
test al, 2
je 0x100085ff
mov dword [ebp - 0x20], 2
jmp 0x10008622
test al, 4
je 0x1000860c
mov dword [ebp - 0x20], 4
jmp 0x10008622
test al, 8
je 0x10008619
mov dword [ebp - 0x20], 8
jmp 0x10008622
movzx eax, al
and eax, 1
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x2c], 0x197
jne 0x10008761
mov eax, 1
mov dword [ebp - 0x18], eax
jmp 0x10008764
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryAuthSchemes]
mov ebx, eax
test ebx, ebx
jne 0x1000867e
push 0x2a
push str.WinHttpQueryAuthSchemes_in_case_401_fails_
mov ecx, dword [ebp + 0x30]
call fcn.10001d00
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 0x2c], 0x191
mov ecx, 1
cmove eax, ecx
mov dword [ebp - 0x18], eax
jmp 0x10008764
mov eax, dword [ebp - 0x28]
test al, 0x10
je 0x1000868c
mov esi, 0x10
jmp 0x100086ba
test al, 2
je 0x10008697
mov esi, 2
jmp 0x100086ba
test al, 4
je 0x100086a2
mov esi, 4
jmp 0x100086ba
test al, 8
je 0x100086ad
mov esi, 8
jmp 0x100086ba
test al, 1
je 0x10008757
mov esi, 1
mov ecx, dword [ebp + 0x40]
mov eax, ecx
cmp dword [ecx + 0x14], 0x10
jb 0x100086c7
mov eax, dword [ecx]
push eax
lea ecx, [ebp - 0x284]
call fcn.10008aa0
mov ecx, dword [ebp + 0x3c]
mov dword [ebp - 4], 4
mov edi, dword [eax]
mov eax, ecx
cmp dword [ecx + 0x14], 0x10
jb 0x100086e9
mov eax, dword [ecx]
push eax
lea ecx, [ebp - 0x8b4]
call fcn.10008aa0
push 0
push edi
push dword [eax]
push esi
push dword [ebp - 0x38]
mov esi, dword [ebp - 0x14]
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetCredentials]
mov ebx, eax
lea ecx, [ebp - 0x8b0]
mov eax, dword [ebp - 0x8b4]
cmp eax, ecx
je 0x10008723
push eax
call fcn.10024f30
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x280]
mov eax, dword [ebp - 0x284]
cmp eax, ecx
je 0x10008743
push eax
call fcn.10024f30
add esp, 4
test ebx, ebx
jne 0x10008664
push 0x28
push str.WinHttpSetCredentials_in_case_401_fails_
jmp 0x1000865c
mov eax, 1
jmp 0x10008667
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 0x28]
mov ecx, dword [ecx]
mov dword [ebp - 0x2c], ecx
test ebx, ebx
je 0x10008778
test eax, eax
je 0x10008079
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push dword [ebp - 0x30]
call esi
push dword [ebp - 0x3c]
call esi
pop edi
test ebx, ebx
pop esi
setne al
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push 0x15
push str.WinHttpConnect_fails_
jmp 0x100087b8
push 0x12
push str.WinHttpOpen_fails_
mov ecx, ebx
call fcn.10001d00
mov ecx, dword [ebp - 0xc]
xor al, al
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
call fcn.10020517
int3