Function at 0x10018b10
Capabilities:
Initialize winhttp library
Read http header
Receive http response

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1006d807
mov eax, dword fs:[0]
push eax
sub esp, 0x124
mov eax, dword [0x10088064]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov dword [ebp - 0x10c], edi
mov eax, ecx
mov dword [ebp - 0x118], eax
mov dword [ebp - 0x128], eax
mov esi, dword [ebp + 0x10]
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], 0
mov dword [ebp - 0x130], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x114], eax
mov eax, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x110], eax
mov dword [ebp - 0xfc], 0
call fcn.10019610
mov dword [ebp - 0xfc], 2
push 0xe
push str.fetch_request
push ecx
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], 1
call fcn.100102d0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x28], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x18], xmm0
xor ecx, ecx
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
mov dword [ebp - 0xfc], 6
mov byte [ebp - 4], 4
lea edx, [ebp - 0x28]
cmp dword [ebp - 0x14], 8
mov ecx, 0x10089bd8
push dword [ebp - 0x18]
cmovae edx, dword [ebp - 0x28]
call fcn.10010c70
push eax
call fcn.1000e9c0
mov byte [ebp - 4], 1
add esp, 8
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x10018c4f
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10018c45
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1001934f
push edx
push ecx
call fcn.1005cd99
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
mov byte [ebp - 4], al
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
cmp edx, 8
jb 0x10018ca0
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10018c96
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1001934f
push edx
push ecx
call fcn.1005cd99
add esp, 8
xor eax, eax
mov dword [ebp - 0x30], 0
cmp dword [esi + 0x14], 8
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
jb 0x10018cbc
mov esi, dword [esi]
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
test eax, eax
je 0x10019354
mov dword [ebp - 0x120], eax
mov dword [ebp - 0xfc], 0xe
mov edx, edi
mov dword [ebp - 4], 6
lea ecx, [ebp - 0x120]
call fcn.10018270
mov ecx, edi
call fcn.10018620
movzx esi, ax
lea ecx, [ebp - 0x28]
lea eax, [edi + 0x30]
push eax
call fcn.10019610
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
mov edi, dword [ebp - 0x120]
cmovae eax, dword [ebp - 0x28]
push 0
push esi
push eax
push edi
mov dword [ebp - 0xfc], 0x2e
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov edx, dword [ebp - 0x14]
mov esi, eax
test esi, esi
sete al
mov byte [ebp - 0xf1], al
cmp edx, 8
jb 0x10018d80
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10018d70
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10019391
push edx
push ecx
call fcn.1005cd99
mov al, byte [ebp - 0xf1]
add esp, 8
xor ecx, ecx
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], cx
test al, al
jne 0x10019396
mov dword [ebp - 0x124], esi
mov dword [ebp - 0xfc], 0x3e
mov dword [ebp - 0x40], ecx
push 3
mov dword [ebp - 0x30], ecx
xor eax, eax
push 0x10079620
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
mov byte [ebp - 4], 8
call fcn.10006100
mov byte [ebp - 4], 0xa
lea eax, [ebp - 0x40]
push dword [ebp - 0x10c]
lea edx, [ebp - 0x124]
push eax
lea ecx, [ebp - 0x100]
call fcn.100187d0
add esp, 8
mov byte [ebp - 4], 0xc
mov edx, dword [ebp - 0x2c]
cmp edx, 8
jb 0x10018e32
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10018e28
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100193d0
push edx
push ecx
call fcn.1005cd99
add esp, 8
mov esi, dword [ebp - 0x100]
xor eax, eax
xor ecx, ecx
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
mov dword [ebp - 0xf8], ecx
mov dword [ebp - 0x10c], eax
mov byte [ebp - 0xf1], al
test ecx, ecx
je 0x10018eb2
mov edx, str.Sending_proxy_credentials
call fcn.1000e6f0
push eax
call fcn.1000e9c0
mov eax, dword [ebp - 0x110]
add esp, 4
mov ecx, eax
cmp dword [eax + 0x14], 8
jb 0x10018e87
mov ecx, dword [eax]
mov edx, dword [ebp - 0x114]
mov eax, edx
cmp dword [edx + 0x14], 8
jb 0x10018e97
mov eax, dword [edx]
push 0
push ecx
push eax
push dword [ebp - 0xf8]
push 1
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetCredentials]
test eax, eax
je 0x10019069
mov edx, str.Sending_request
call fcn.1000e6f0
push eax
call fcn.1000e9c0
add esp, 4
push 0
push 0
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x10019334
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x10019319
push 0
lea eax, [ebp - 0x11c]
mov dword [ebp - 0x108], 0
push eax
lea eax, [ebp - 0x108]
mov dword [ebp - 0x11c], 4
push eax
push 0
push 0x20000013
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x100192e3
mov eax, dword [ebp - 0x108]
sub eax, 0xc8
je 0x1001908b
sub eax, 0xc9
je 0x10018ff2
sub eax, 6
je 0x10018f67
mov edx, str.Error:_unexpected_status_code
call fcn.1000e6f0
push eax
call fcn.1000e9c0
mov al, byte [ebp - 0xf1]
add esp, 4
jmp 0x10018fc5
mov edx, str.407_The_proxy_requires_authentication
call fcn.1000e6f0
push eax
call fcn.1000e9c0
add esp, 4
lea edx, [ebp - 0x100]
lea ecx, [ebp - 0x64]
call fcn.10018a00
mov ecx, dword [eax + 8]
call fcn.10018ab0
cmp dword [ebp - 0x10c], 0x197
mov ecx, eax
mov dword [ebp - 0xf8], ecx
jne 0x10018fe4
mov edx, str.Break_for_multiple_407_response
call fcn.1000e6f0
push eax
call fcn.1000e9c0
add esp, 4
mov al, 1
mov byte [ebp - 0xf1], al
mov esi, dword [ebp - 0x100]
mov ecx, dword [ebp - 0xf8]
mov edx, dword [ebp - 0x108]
mov dword [ebp - 0x10c], edx
test al, al
je 0x10018e60
jmp 0x1001909e
mov esi, dword [ebp - 0x100]
mov al, byte [ebp - 0xf1]
jmp 0x10018fcb
mov edx, str.401_The_server_requires_authentication
call fcn.1000e6f0
push eax
call fcn.1000e9c0
add esp, 4
lea edx, [ebp - 0x100]
lea ecx, [ebp - 0x1c]
call fcn.10018a00
mov ecx, dword [eax + 8]
mov esi, dword [eax]
call fcn.10018ab0
test eax, eax
setne byte [ebp - 0x101]
test eax, eax
je 0x10018fb7
mov edx, str.Sending_server_credentials
call fcn.1000e6f0
push eax
call fcn.1000e9c0
push dword [ebp - 0x110]
movzx eax, byte [ebp - 0x101]
lea ecx, [ebp - 0x100]
push dword [ebp - 0x114]
mov edx, esi
push eax
call fcn.10018950
mov al, byte [ebp - 0xf1]
add esp, 0x10
jmp 0x10018fbf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Error__WinHttpSetCredentials_
lea ecx, [ebp - 0x58]
mov esi, eax
call fcn.10006070
mov byte [ebp - 4], 0xd
lea eax, [ebp - 0x58]
push esi
jmp 0x100193b3
mov edx, str.200_The_resource_was_successfully_retrieved
call fcn.1000e6f0
push eax
call fcn.1000e9c0
add esp, 4
mov eax, dword [ebp - 0x118]
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
lea eax, [ebp - 0xf8]
mov dword [ebp - 0xfc], 0x3f
push eax
push esi
mov dword [ebp - 0xf8], 0
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x10019231
mov eax, dword [ebp - 0xf8]
xor ecx, ecx
test eax, eax
setne cl
mov dword [ebp - 0x114], ecx
test eax, eax
je 0x10019297
mov byte [ebp - 4], 0x12
mov dword [ebp - 0x11c], 0
test ecx, ecx
jne 0x10019137
lea eax, [ebp - 0x10c]
mov dword [ebp - 0x10c], ecx
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x10019253
mov ecx, dword [ebp - 0x10c]
mov dword [ebp - 0x114], ecx
or dword [ebp - 0xfc], 0x40
xor eax, eax
xor edx, edx
mov dword [ebp - 0x108], eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x110], edx
mov dword [ebp - 0x5c], edx
test ecx, ecx
je 0x10019180
push ecx
push ecx
lea ecx, [ebp - 0x64]
call fcn.10010ee0
mov edx, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x64]
mov ecx, dword [ebp - 0x114]
mov dword [ebp - 0x110], edx
mov dword [ebp - 0x108], eax
nop dword [eax]
lea edx, [ebp - 0x11c]
push edx
push ecx
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x10019275
push dword [ebp - 0x12c]
mov eax, dword [ebp - 0x118]
mov ecx, eax
push dword [ebp - 0x60]
push dword [ebp - 0x108]
push dword [eax + 4]
call fcn.1001a450
and dword [ebp - 0xfc], 0xffffffbf
mov byte [ebp - 4], 0xc
mov ecx, dword [ebp - 0x108]
test ecx, ecx
je 0x10019211
mov edx, dword [ebp - 0x110]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x100191f2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1001934f
push edx
push ecx
call fcn.1005cd99
add esp, 8
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0
lea eax, [ebp - 0xf8]
mov dword [ebp - 0xf8], 0
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x100190e2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Error__WinHttpQueryDataAvailable_
lea ecx, [ebp - 0x58]
mov esi, eax
call fcn.10006070
mov byte [ebp - 4], 0x11
lea eax, [ebp - 0x58]
push esi
jmp 0x10019374
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Error__WinHttpQueryDataAvailable_
lea ecx, [ebp - 0x58]
mov esi, eax
call fcn.10006070
mov byte [ebp - 4], 0x13
lea eax, [ebp - 0x58]
push esi
jmp 0x100193b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Error__WinHttpReadData_
lea ecx, [ebp - 0x58]
mov esi, eax
call fcn.10006070
mov byte [ebp - 4], 0x14
lea eax, [ebp - 0x58]
push esi
jmp 0x10019374
mov ecx, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test esi, esi
je 0x100192aa
push esi
call ecx
mov ecx, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [ebp - 0x124]
test eax, eax
je 0x100192b7
push eax
call ecx
test edi, edi
je 0x100192c2
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [ebp - 0x118]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1005c833
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Error__WinHttpQueryHeaders_
lea ecx, [ebp - 0x58]
mov esi, eax
call fcn.10006070
mov byte [ebp - 4], 0x10
push esi
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0xb0]
call fcn.10017490
push 0x1008617c
lea eax, [ebp - 0xb0]
jmp 0x1001938b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Error__WinHttpReceiveResponse_
lea ecx, [ebp - 0x58]
mov esi, eax
call fcn.10006070
mov byte [ebp - 4], 0xf
jmp 0x100192fc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Error__WinHttpSendRequest_
lea ecx, [ebp - 0x58]
mov esi, eax
call fcn.10006070
mov byte [ebp - 4], 0xe
jmp 0x100192fc
call fcn.10061be0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Error__WinHttpOpen_
lea ecx, [ebp - 0x70]
mov esi, eax
call fcn.10006070
mov dword [ebp - 4], 5
lea eax, [ebp - 0x70]
push esi
push eax
lea ecx, [ebp - 0xf0]
call fcn.10017490
push 0x1008617c
lea eax, [ebp - 0xf0]
push eax
call sub.msvcrt.dll__CxxThrowException
call fcn.10061be0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Error__WinHttpConnect_
lea ecx, [ebp - 0x40]
mov esi, eax
call fcn.10006070
mov byte [ebp - 4], 7
lea eax, [ebp - 0x40]
push esi
push eax
lea ecx, [ebp - 0xb0]
call fcn.10017490
push 0x1008617c
lea eax, [ebp - 0xb0]
push eax
call sub.msvcrt.dll__CxxThrowException
call fcn.10061be0
int3