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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100332ff
mov eax, dword fs:[0]
push eax
mov eax, 0x14dc
call fcn.10016910
mov eax, dword [0x10046070]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov edi, ecx
mov dword [ebp - 0x14a4], edi
mov eax, dword [ebp + 8]
mov dword [ebp - 0x14a0], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x149c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x1498], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x1494], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x1474], eax
mov dword [ebp - 0x14ac], 0
mov dword [ebp - 0x1418], 0
mov dword [ebp - 0x1414], 0xf
mov byte [ebp - 0x1428], 0
mov dword [ebp - 4], 0
cmp dword [esi + 0x10], 0
je 0x1000e1cb
test eax, eax
jle 0x1000e1cb
push 0x3c
lea eax, [ebp - 0x14e8]
push 0
push eax
call fcn.100187a0
push 0x20
mov dword [ebp - 0x14e8], 0x3c
call fcn.10015fb2
push 0x208
mov dword [ebp - 0x14e4], eax
mov dword [ebp - 0x14e0], 0x10
call fcn.10015fb2
push 0x208
mov dword [ebp - 0x14d8], eax
mov dword [ebp - 0x14d4], 0x104
call fcn.10015fb2
push 0x208
mov dword [ebp - 0x14bc], eax
mov dword [ebp - 0x14b8], 0x104
call fcn.10015fb2
add esp, 0x1c
mov dword [ebp - 0x14b4], eax
cmp dword [esi + 0x14], 8
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x14b0], 0x104
jb 0x1000daa3
mov esi, dword [esi]
lea ecx, [ebp - 0x14e8]
push ecx
push closesocket
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
je 0x1000e1cb
mov eax, dword [ebp - 0x14a0]
cmp dword [eax + 0x14], 8
jb 0x1000dacd
mov eax, dword [eax]
push 0
push 0
push 0
push 1
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov esi, eax
mov dword [ebp - 0x147c], esi
test esi, esi
jne 0x1000db12
sub esp, 0x18
mov ecx, esp
push str.Failed_open_session_
call fcn.10001bf0
call fcn.10010d10
add esp, 0x18
lea eax, [ebp - 0x1428]
mov ecx, edi
push eax
call fcn.10001bb0
jmp 0x1000e20b
push 0x2710
push 0x2710
push 0x2710
push 0x2710
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
test eax, eax
jne 0x1000db62
sub esp, 0x18
mov ecx, esp
push str.Failed_set_timeout_
call fcn.10001bf0
call fcn.10010d10
add esp, 0x18
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
lea eax, [ebp - 0x1428]
mov ecx, edi
push eax
call fcn.10001bb0
jmp 0x1000e20b
push 0
push dword [ebp - 0x14d0]
xor eax, eax
cmp dword [ebp - 0x14dc], 1
push dword [ebp - 0x14d8]
sete al
push esi
mov dword [ebp - 0x1480], eax
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ecx, eax
mov dword [ebp - 0x1478], ecx
test ecx, ecx
jne 0x1000dbc6
sub esp, 0x18
mov ecx, esp
push str.Failed_connect_
call fcn.10001bf0
call fcn.10010d10
add esp, 0x18
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
lea eax, [ebp - 0x1428]
mov ecx, edi
push eax
call fcn.10001bb0
jmp 0x1000e20b
xor edx, edx
mov eax, 0x800000
cmp dword [ebp - 0x1480], edx
cmovne eax, edx
push eax
push edx
push edx
push edx
push dword [ebp - 0x14bc]
push 0x10041380
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
mov dword [ebp - 0x148c], esi
test esi, esi
jne 0x1000dc38
sub esp, 0x18
mov ecx, esp
push str.Failed_open_request_
call fcn.10001bf0
call fcn.10010d10
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
add esp, 0x18
push dword [ebp - 0x1478]
call esi
push dword [ebp - 0x147c]
call esi
lea eax, [ebp - 0x1428]
mov ecx, edi
push eax
call fcn.10001bb0
jmp 0x1000e20b
xor eax, eax
mov dword [ebp - 0x1430], 0
mov dword [ebp - 0x142c], 7
mov word [ebp - 0x1440], ax
mov eax, dword [ebp - 0x149c]
mov byte [ebp - 4], 1
cmp dword [eax + 0x10], 0
je 0x1000dcb8
push eax
mov edx, str.X_FORWARDED_HOST:
lea ecx, [ebp - 0x1470]
call fcn.100098e0
mov edx, eax
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1458]
call fcn.1000fe80
add esp, 4
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x1440]
mov byte [ebp - 4], 3
call fcn.1000a370
lea ecx, [ebp - 0x1458]
call fcn.100075f0
lea ecx, [ebp - 0x1470]
mov byte [ebp - 4], 1
call fcn.100075f0
mov eax, dword [ebp - 0x1498]
cmp dword [eax + 0x10], 0
je 0x1000dd17
push eax
mov edx, str.X_FORWARDED_FOR:
lea ecx, [ebp - 0x1470]
call fcn.100098e0
mov edx, eax
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x1458]
call fcn.1000fe80
add esp, 4
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x1440]
mov byte [ebp - 4], 5
call fcn.1000a370
lea ecx, [ebp - 0x1458]
call fcn.100075f0
lea ecx, [ebp - 0x1470]
mov byte [ebp - 4], 1
call fcn.100075f0
mov eax, dword [ebp - 0x1494]
cmp dword [eax + 0x10], 0
je 0x1000dd76
push eax
mov edx, str.Referer:
lea ecx, [ebp - 0x1470]
call fcn.100098e0
mov edx, eax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x1458]
call fcn.1000fe80
add esp, 4
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x1440]
mov byte [ebp - 4], 7
call fcn.1000a370
lea ecx, [ebp - 0x1458]
call fcn.100075f0
lea ecx, [ebp - 0x1470]
mov byte [ebp - 4], 1
call fcn.100075f0
cmp dword [ebp - 0x1430], 0
je 0x1000de25
cmp dword [ebp - 0x142c], 8
lea ecx, [ebp - 0x1440]
mov edx, dword [ebp - 0x1440]
cmovae ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x1484], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1000dda2
sub ecx, dword [ebp - 0x1484]
lea eax, [ebp - 0x1440]
sar ecx, 1
cmp dword [ebp - 0x142c], 8
push 0x20000000
push ecx
cmovae eax, edx
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
jne 0x1000de25
sub esp, 0x18
mov ecx, esp
push str.Failed_add_header_
call fcn.10001bf0
call fcn.10010d10
add esp, 0x18
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push dword [ebp - 0x1478]
call esi
push dword [ebp - 0x147c]
call esi
lea eax, [ebp - 0x1428]
mov ecx, edi
push eax
call fcn.10001bb0
lea ecx, [ebp - 0x1440]
call fcn.100075f0
jmp 0x1000e20b
cmp dword [ebp - 0x1480], 0
mov dword [ebp - 0x14a8], 0x3300
jne 0x1000de9c
push 4
lea eax, [ebp - 0x14a8]
push eax
push 0x1f
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
jne 0x1000de9c
sub esp, 0x18
mov ecx, esp
push str.Failed_set_dwFlags_
call fcn.10001bf0
call fcn.10010d10
add esp, 0x18
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push dword [ebp - 0x1478]
call esi
push dword [ebp - 0x147c]
call esi
lea eax, [ebp - 0x1428]
mov ecx, edi
push eax
call fcn.10001bb0
lea ecx, [ebp - 0x1440]
call fcn.100075f0
jmp 0x1000e20b
push 0
push 0
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x1000df0f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x410]
push str.Error__d_has_occurred._n
push eax
call fcn.1000fee0
add esp, 0xc
lea eax, [ebp - 0x410]
lea ecx, [ebp - 0x1458]
push eax
call fcn.10001bf0
mov byte [ebp - 4], 8
mov edx, str.Failed_send_request:
sub esp, 0x18
mov ecx, esp
push eax
call fcn.10009500
add esp, 4
call fcn.10010d10
add esp, 0x18
lea ecx, [ebp - 0x1458]
call fcn.10001b50
jmp 0x1000ddee
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x1000df54
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x410]
push str.Error__d_has_occurred._n
push eax
call fcn.1000fee0
add esp, 0xc
lea eax, [ebp - 0x410]
lea ecx, [ebp - 0x1458]
push eax
call fcn.10001bf0
mov byte [ebp - 4], 9
mov edx, str.Failed_receive_response:
jmp 0x1000dee9
push 0
lea eax, [ebp - 0x14a4]
mov dword [ebp - 0x1490], 0
push eax
lea eax, [ebp - 0x1490]
mov dword [ebp - 0x14a4], 4
push eax
push 0
push 0x20000013
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov edx, dword [ebp - 0x1490]
cmp edx, 0x12c
jb 0x1000dfa0
cmp edx, 0x12f
jbe 0x1000e0b6
cmp edx, 0x133
je 0x1000e0b6
cmp edx, 0x134
je 0x1000e0b6
cmp edx, 0xc8
je 0x1000dfe1
cmp edx, 0x194
je 0x1000dfe1
lea ecx, [ebp - 0x1458]
call fcn.10002170
mov byte [ebp - 4], 0xc
mov edx, str.Error:_Status_Code_:
jmp 0x1000dee9
mov dword [ebp - 0x1480], 0xa
nop dword [eax + eax]
lea eax, [ebp - 0x1488]
mov dword [ebp - 0x1488], 0
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x1000ddee
mov eax, dword [ebp - 0x1488]
inc eax
push eax
call fcn.10015fb2
mov esi, eax
add esp, 4
test esi, esi
je 0x1000e0a1
mov ecx, dword [ebp - 0x1488]
inc ecx
push ecx
push 0
push esi
call fcn.100187a0
add esp, 0xc
mov dword [ebp - 0x1484], 0
lea eax, [ebp - 0x1484]
push eax
push dword [ebp - 0x1488]
push esi
push dword [ebp - 0x148c]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x1000e069
dec dword [ebp - 0x1480]
jmp 0x1000e07b
push dword [ebp - 0x1484]
lea ecx, [ebp - 0x1428]
push esi
call fcn.10007240
push esi
call fcn.10015d67
add esp, 4
cmp dword [ebp - 0x1488], 0
jbe 0x1000e0ab
cmp dword [ebp - 0x1480], 0
jl 0x1000e0ab
mov esi, dword [ebp - 0x148c]
jmp 0x1000dff0
mov dword [ebp - 0x1488], 0
mov esi, dword [ebp - 0x148c]
jmp 0x1000ddee
push 0
lea eax, [ebp - 0x1484]
mov dword [ebp - 0x1484], 0x1000
push eax
lea eax, [ebp - 0x1410]
push eax
push 0
push 0x21
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
xor eax, eax
mov dword [ebp - 0x1460], 0
mov dword [ebp - 0x145c], 7
mov word [ebp - 0x1470], ax
mov byte [ebp - 4], 0xa
lea eax, [ebp - 0x1410]
push dword [ebp - 0x1484]
lea ecx, [ebp - 0x1470]
push eax
call fcn.1000a280
cmp dword [ebp - 0x145c], 8
lea eax, [ebp - 0x1480]
lea esi, [ebp - 0x1470]
cmovae esi, dword [ebp - 0x1470]
lea ecx, [ebp - 0x1470]
push eax
call fcn.1000ec00
mov byte [ebp - 0x148c], 0
lea ecx, [ebp - 0x1458]
push dword [ebp - 0x148c]
mov dword [ebp - 0x1448], 0
push dword [eax]
mov dword [ebp - 0x1444], 0xf
push esi
mov byte [ebp - 0x1458], 0
call fcn.100101f0
mov eax, dword [ebp - 0x1474]
lea edx, [ebp - 0x1470]
dec eax
mov byte [ebp - 4], 0xb
push eax
mov eax, dword [ebp - 0x1494]
mov ecx, edi
push eax
mov eax, dword [ebp - 0x1498]
push eax
mov eax, dword [ebp - 0x149c]
push eax
mov eax, dword [ebp - 0x14a0]
push eax
call fcn.1000d970
add esp, 0x14
lea ecx, [ebp - 0x1458]
call fcn.10001b50
lea ecx, [ebp - 0x1470]
call fcn.100075f0
lea ecx, [ebp - 0x1440]
call fcn.100075f0
jmp 0x1000e20b
movups xmm0, xmmword [ebp - 0x1428]
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
movups xmmword [edi], xmm0
mov byte [ebp - 0x1428], 0
movq xmm0, qword [ebp - 0x1418]
movq qword [edi + 0x10], xmm0
mov dword [ebp - 0x1418], 0
mov dword [ebp - 0x1414], 0xf
lea ecx, [ebp - 0x1428]
call fcn.10001b50
mov eax, edi
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.1001578e
mov esp, ebp
pop ebp
ret