Function at 0x10006100
Capabilities:
Prepare http request
Read http header
Receive http response

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1013adf3
mov eax, dword fs:[0]
push eax
sub esp, 0x7c
push ebx
push esi
push edi
mov eax, dword [0x1019b120]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x20], 0x1f4
call fcn.1000c3bc
xor edx, edx
mov ecx, eax
test ecx, ecx
setne dl
test edx, edx
jne 0x1000615f
push 0x80004005
call fcn.100032c0
mov eax, dword [ecx]
call dword [eax + 0xc]
lea ebx, [eax + 0x10]
mov dword [ebp - 0x30], ebx
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x74]
mov esi, dword [ebp + 0xc]
push esi
call fcn.10002dd0
xor eax, eax
mov byte [ebp - 4], 2
cmp byte [ebp + 0x10], al
mov ecx, 0x2000
mov dword [ebp - 0x24], 0
cmovne eax, ecx
mov dword [ebp - 0x50], 4
or eax, 0x1002
lea ecx, [ebp - 0x88]
push eax
push esi
call fcn.1000cb2d
cmp byte [ebp + 0x10], 0
mov byte [ebp - 4], 3
je 0x100061c9
push 2
push 0
push 0
lea ecx, [ebp - 0x88]
call fcn.1000d321
push dword [ebp + 8]
xor eax, eax
lea ecx, [ebp + 0xc]
mov dword [ebp - 0x1c], eax
call fcn.10002dd0
push 0x1017cc58
push str.http:__
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 4
mov byte [ebp + 8], 0
call fcn.10006780
test eax, eax
jne 0x1000621e
push 0x1017cc58
push str.https:__
lea ecx, [ebp + 0xc]
call fcn.10006780
mov ecx, eax
mov esi, 1
mov eax, dword [ebp + 8]
test ecx, ecx
movzx eax, al
cmovne eax, esi
mov dword [ebp + 8], eax
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
push eax
call fcn.10003050
add esp, 4
lea edi, [eax + 0x10]
mov dword [ebp - 0x38], edi
mov byte [ebp - 4], 5
mov eax, dword [ebp + 0xc]
cmp dword [eax - 0xc], 0
jl 0x100062af
push 0x1017cc8c
push eax
call fcn.101228e4
mov esi, eax
add esp, 8
mov eax, dword [ebp + 0xc]
test esi, esi
je 0x100062af
sub esi, eax
sar esi, 1
js 0x100062af
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, esi
or ecx, edx
jge 0x1000627a
push esi
lea ecx, [ebp + 0xc]
call fcn.10003210
mov eax, dword [ebp + 0xc]
cmp esi, dword [eax - 8]
jg 0x100062d0
mov dword [eax - 0xc], esi
xor ecx, ecx
mov eax, dword [ebp + 0xc]
push 0x1017cc58
mov word [eax + esi*2], cx
lea ecx, [ebp - 0x38]
push dword [ebp + 0xc]
call fcn.10006780
mov edi, dword [ebp - 0x38]
lea ecx, [ebp - 0x30]
push edi
push 0
call fcn.100066a0
mov ebx, dword [ebp - 0x30]
mov eax, dword [ebp + 0xc]
cmp byte [ebp + 8], 0
push 0
je 0x100062da
push 0x1bb
push eax
mov eax, dword [ebp - 0x18]
push dword [eax + 0x40]
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ecx, eax
mov dword [ebp - 0x34], ecx
jmp 0x100062ee
push 0x80070057
call fcn.100032c0
push 0x50
push eax
mov eax, dword [ebp - 0x18]
push dword [eax + 0x40]
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ecx, eax
mov dword [ebp - 0x34], eax
test ecx, ecx
jne 0x10006303
push 0x10195ca0
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], ecx
push eax
call fcn.10123774
xor eax, eax
mov edx, 0x800000
cmp byte [ebp + 8], al
cmovne eax, edx
or eax, 0x100
push eax
push 0
push 0
push 0
push ebx
push 0x1017c74c
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x10006341
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x4c]
push 0x10195ca0
push eax
call fcn.10123774
push 0
lea ecx, [ebp - 0x50]
push ecx
lea ecx, [ebp - 0x24]
push ecx
push 0
push 5
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov ecx, dword [ebp - 0x24]
or edx, 0xffffffff
test eax, eax
cmove ecx, edx
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x24], ecx
mov esi, dword [edx + 0x18]
test esi, esi
je 0x10006393
mov eax, dword [edx + 0xc]
test eax, eax
je 0x10006393
mov ecx, dword [edx + 0x10]
test ecx, ecx
je 0x10006393
mov edx, dword [edx + 0x14]
test edx, edx
je 0x10006393
push edx
push ecx
push eax
mov eax, dword [ebp - 0x18]
push esi
push dword [eax + 0x40]
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
mov dword [ebp - 0x5c], 4
call fcn.1000c3bc
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x100063b6
push 0x80004005
call fcn.100032c0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x3c], eax
cmp byte [ebp + 0x10], 0
mov byte [ebp - 4], 6
je 0x100063de
lea ecx, [ebp - 0x88]
call fcn.1000d028
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x28], edx
push 0x80c00
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x44], 0
call fcn.1000b60d
mov ecx, dword [ebp - 0x1c]
add esp, 4
mov dword [ebp - 0x28], eax
mov edx, 0x80c00
lea eax, [ecx - 1]
add eax, edx
push eax
push ecx
lea eax, [ebp - 0x3c]
push str.Range:_bytes_d__d
push eax
call fcn.10002b40
mov esi, dword [ebp - 0x3c]
add esp, 0x10
xor edx, edx
mov eax, esi
mov ecx, dword [esi - 0xc]
test ecx, ecx
push edx
push edx
push edx
push edx
push ecx
cmove eax, edx
push eax
push dword [ebp - 0x14]
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x1000644f
mov dword [ebp - 0x54], eax
lea eax, [ebp - 0x54]
push 0x10195ca0
push eax
call fcn.10123774
push 0
push dword [ebp - 0x14]
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x1000646f
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x58]
push 0x10195ca0
push eax
call fcn.10123774
push 0
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x20]
push eax
push 0
push 0x20000013
push dword [ebp - 0x14]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
jne 0x1000649e
mov dword [ebp - 0x60], eax
lea eax, [ebp - 0x60]
push 0x10195ca0
push eax
call fcn.10123774
cmp dword [ebp - 0x20], 0x12c
jb 0x100064bc
push 0x10195ca0
lea eax, [ebp - 0x64]
mov dword [ebp - 0x64], 0
push eax
call fcn.10123774
xor eax, eax
mov dword [ebp + 8], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp + 0x10], eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x30]
test eax, eax
je 0x100064ec
call eax
test al, al
jne 0x100064ec
push 0x10195ca0
lea eax, [ebp - 0x68]
mov dword [ebp - 0x68], 0
push eax
call fcn.10123774
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x1000650e
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x6c]
push 0x10195ca0
push eax
call fcn.10123774
lea eax, [ebp - 0x44]
push eax
push dword [ebp - 0x40]
push dword [ebp + 0x10]
push dword [ebp - 0x14]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x10006536
mov dword [ebp - 0x70], eax
lea eax, [ebp - 0x70]
push 0x10195ca0
push eax
call fcn.10123774
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp + 8]
add dword [ebp + 0x10], eax
add ecx, eax
mov dword [ebp + 8], ecx
test eax, eax
jne 0x100064c7
push ecx
push dword [ebp - 0x28]
lea ecx, [ebp - 0x88]
call fcn.1000d458
lea ecx, [ebp - 0x88]
call fcn.1000d001
mov ecx, dword [ebp - 0x1c]
mov edx, 0x80c00
add ecx, dword [ebp + 8]
mov dword [ebp - 0x1c], ecx
cmp dword [ebp + 8], edx
jae 0x10006404
push dword [ebp - 0x28]
call fcn.1000b616
add esi, 0xfffffff0
mov byte [ebp - 4], 5
add esp, 4
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x100065a6
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov byte [ebp - 4], 4
or ecx, 0xffffffff
lea eax, [edi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x100065c4
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 3
or edi, 0xffffffff
mov edx, dword [ebp + 0xc]
mov ecx, edi
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x100065e7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x88]
mov byte [ebp - 4], 2
call fcn.1000cbe5
mov dword [ebp - 4], 1
jmp 0x10006619
mov eax, dword [ebp - 0x34]
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test eax, eax
je 0x10006629
push eax
call esi
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x10006633
push eax
call esi
cmp dword [ebp - 0x20], 0x12c
mov ecx, edi
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x74]
setb byte [ebp + 0x13]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1000665e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add ebx, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [ebx + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x1000667c
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov al, byte [ebp + 0x13]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc