Function at 0x10001603
Capabilities:
Check http status code
Prepare http request
Read http header
Receive http response
Set http header

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x23a8
call fcn.10002b70
cmp dword [ebp + 0x14], 0x3e8
push ebx
push esi
push edi
jg 0x100019a4
xor ebx, ebx
cmp dword [ebp + 0x14], ebx
jl 0x100019a4
push 0x1f
xor eax, eax
pop ecx
lea edi, [ebp - 0xa6]
mov word [ebp - 0xa8], bx
push dword [ebp + 0x20]
rep stosd dword es:[edi], eax
or dword [ebp - 4], 0xffffffff
stosw word es:[edi], ax
lea eax, [ebp - 0xa8]
push eax
call fcn.10001de6
xor eax, eax
lea edi, [ebp - 0xe]
pop ecx
mov word [ebp - 0x18], 0x47
mov word [ebp - 0x16], 0x45
mov word [ebp - 0x14], 0x54
mov word [ebp - 0x12], bx
mov word [ebp - 0x10], bx
stosd dword es:[edi], eax
pop ecx
mov esi, 0x100
push esi
push ebx
stosw word es:[edi], ax
push ebx
lea eax, [ebp - 0xa8]
push ebx
push eax
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 8]
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x100019a4
mov ecx, 0x7ff
xor eax, eax
lea edi, [ebp - 0x23a7]
mov byte [ebp - 0x23a8], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x23a8]
push 0x2000
push eax
call fcn.1000157c
mov eax, dword [ebp + 0x20]
mov edi, dword [ebp + 0xc]
pop ecx
cmp edi, 0xab1
pop ecx
mov ecx, dword [eax + 0x1c]
mov dword [ebp - 8], ecx
jne 0x100016fc
mov eax, dword [eax + 0xe04]
push 4
mov dword [ebp + 0x20], eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp + 0x20]
push 4
push eax
call fcn.10001e58
add esp, 0x10
mov eax, dword [ebp - 8]
cmp dword [ebp + 0x10], ebx
mov dword [ebp - 0x23a8], eax
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x239c], edi
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x23a4], 0x10050014
mov dword [ebp - 0x23a0], eax
mov dword [ebp - 0x2398], edi
je 0x1000173f
push edi
lea eax, [ebp - 0x2394]
push dword [ebp + 0x10]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push 0x40
push 8
call fcn.1000153b
lea eax, [eax + edi + 0x14]
pop ecx
mov dword [ebp + 0x20], eax
pop ecx
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 0x7f
xor eax, eax
pop ecx
lea edi, [ebp - 0x3a6]
mov word [ebp - 0x3a8], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x3a8]
push eax
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpTimeFromSystemTime]
push 0x3f
xor eax, eax
pop ecx
lea edi, [ebp - 0x1a7]
mov byte [ebp - 0x1a8], bl
push esi
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x1a8]
push eax
lea eax, [ebp - 0x3a8]
push eax
call fcn.10001e1b
add esp, 0xc
lea eax, [ebp - 0x1a8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push dword [ebp + 0x20]
lea ecx, [ebp - 0x23a8]
push ecx
push eax
lea eax, [ebp - 0x1a8]
push eax
call fcn.10001e58
add esp, 0x10
mov edi, 0x10200
push edi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
push edi
push ebx
push esi
call sub.MSVCRT.dll_memset
mov edi, dword [sym.imp.MSVCRT.dll_swprintf]
add esp, 0xc
lea ecx, [ebp - 0x3a8]
lea eax, [esi + 0x8200]
push ecx
push str.Date:__s_r_nConnection:_keep_alive_r_nAccept:___r_n
push eax
call edi
add esp, 0xc
lea eax, [esi + 0x9200]
push str.Cookie:
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
cmp dword [ebp + 0x20], ebx
mov dword [ebp + 0x14], ebx
jle 0x10001859
mov eax, dword [ebp + 0x14]
movzx eax, byte [ebp + eax - 0x23a8]
push eax
lea eax, [esi + 0x9200]
push eax
push str._s_02X
push eax
call edi
add esp, 0x10
inc dword [ebp + 0x14]
mov eax, dword [ebp + 0x14]
cmp eax, dword [ebp + 0x20]
jl 0x10001830
lea eax, [esi + 0x9200]
push eax
lea eax, [esi + 0x8200]
push eax
push str._s_s_r_n
push eax
call edi
add esp, 0x10
lea edi, [esi + 0x8200]
push 0x20000000
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push edi
push dword [ebp + 8]
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
je 0x10001987
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [ebp + 8]
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x10001987
push ebx
push dword [ebp + 8]
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x10001987
cmp dword [ebp + 0x18], ebx
jne 0x100018c8
mov dword [ebp + 0x18], esi
mov edi, 0x8000
push edi
push ebx
push esi
mov dword [ebp + 0x14], edi
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp + 0x14]
push ebx
push eax
push esi
push ebx
push 5
push dword [ebp + 8]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x10001987
mov eax, dword [ebp + 0x14]
push esi
mov byte [eax + esi], bl
call dword [sym.imp.MSVCRT.dll__wtoi]
cmp eax, ebx
pop ecx
mov dword [ebp + 0x20], eax
jbe 0x10001987
cmp eax, edi
ja 0x10001987
push edi
push ebx
push esi
mov dword [ebp + 0x14], edi
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp + 0x14]
push ebx
push eax
push esi
push ebx
push 0x13
push dword [ebp + 8]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x10001987
mov eax, dword [ebp + 0x14]
push esi
mov byte [eax + esi], bl
call dword [sym.imp.MSVCRT.dll__wtoi]
cmp eax, 0xc8
pop ecx
jne 0x10001987
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x20]
mov dword [ebp + 0x10], ebx
xor edi, edi
mov dword [eax], ecx
lea eax, [ebp + 0x10]
push eax
mov eax, dword [ebp + 0x18]
push dword [ebp + 0x20]
add eax, edi
push eax
push dword [ebp + 8]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x1000197d
cmp dword [ebp + 0x10], ebx
jbe 0x1000197f
add edi, dword [ebp + 0x10]
cmp edi, dword [ebp + 0x20]
je 0x10001984
jmp 0x10001954
xor edi, edi
cmp edi, dword [ebp + 0x20]
jne 0x10001987
mov dword [ebp - 4], ebx
push dword [ebp + 8]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 4]
jmp 0x100019a7
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret