Function at 0x497440
Capabilities:
Initialize winhttp library
Prepare http request
Read http header
Receive http response

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e297e
mov eax, dword fs:[0]
push eax
sub esp, 0xdc
mov eax, dword [0x50c7c4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov dword [ebp - 0xbc], ecx
mov dword [ebp - 4], 0
cmp dword [ebp + 0x18], 1
jae 0x49748b
or esi, 0xffffffff
jmp 0x497933
push 0
push 0x4ef4d1
lea ecx, [ebp - 0x80]
mov dword [ebp - 0x6c], 0xf
mov dword [ebp - 0x70], 0
mov byte [ebp - 0x80], 0
call fcn.00403860
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x68]
push 0
push 0x4ef4d1
mov dword [ebp - 0x54], 0xf
mov dword [ebp - 0x58], 0
mov byte [ebp - 0x68], 0
call fcn.00403860
mov byte [ebp - 4], 2
lea eax, [ebp - 0x68]
cmp dword [ebp + 0x1c], 0x10
lea ecx, [ebp + 8]
push eax
cmovae ecx, dword [ebp + 8]
lea edx, [ebp - 0x80]
call fcn.00497970
add esp, 4
test al, al
jne 0x4974fb
or esi, 0xffffffff
jmp 0x4978ed
lea edx, [ebp - 0x80]
lea ecx, [ebp - 0x98]
call fcn.00424170
lea edx, [ebp - 0x68]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xb0]
call fcn.00424170
push 0
push 0
push 0
push 0
mov byte [ebp - 4], 4
push str.Aurora_Console_App
mov dword [ebp - 0xc0], 0
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ecx, eax
mov dword [ebp - 0xd8], ecx
test ecx, ecx
jne 0x497564
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WinHttpOpen_failed__0x_.8X__n
call fcn.004a827a
add esp, 8
or esi, 0xffffffff
jmp 0x497885
cmp dword [ebp - 0x84], 8
lea eax, [ebp - 0x98]
push 0
cmovae eax, dword [ebp - 0x98]
push esi
push eax
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ecx, eax
mov dword [ebp - 0xe0], ecx
test ecx, ecx
jne 0x4975ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WinHttpConnect_failed__0x_.8X__n
call fcn.004a827a
add esp, 8
or esi, 0xffffffff
jmp 0x497885
cmp dword [ebp - 0x9c], 8
lea edx, [ebp - 0xe8]
push 0x800000
push edx
push 0
push 0
lea eax, [ebp - 0xb0]
mov dword [ebp - 0xe8], str.text_html
cmovae eax, dword [ebp - 0xb0]
push eax
push 0x4f7738
push ecx
mov dword [ebp - 0xe4], 0
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edi, eax
test edi, edi
jne 0x497612
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WinHttpOpenRequest_failed__0x_.8X__n
call fcn.004a827a
add esp, 8
or esi, 0xffffffff
jmp 0x497885
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpQueryOption]
lea eax, [ebp - 0xdc]
push eax
lea eax, [ebp - 0xc8]
mov dword [ebp - 0xdc], 4
push eax
push 0x1f
push edi
call esi
push 4
lea eax, [ebp - 0xc8]
push eax
push 0x1f
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
push 0
push 0
push 0
push 0
push 0
push 0
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x49767a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WinHttpSendRequest_failed___d__n
call fcn.004a827a
add esp, 8
or esi, 0xffffffff
jmp 0x497885
push 0
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x4976a3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WinHttpReceiveResponse_failed__0x_.8X__n
call fcn.004a827a
add esp, 8
or esi, 0xffffffff
jmp 0x497885
lea eax, [ebp - 0xcc]
mov dword [ebp - 0xcc], 4
push eax
lea eax, [ebp - 0xd0]
push eax
push 0x4e
push edi
call esi
test eax, eax
jne 0x4976d8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WinHttpQueryOption_failed__0x_.8X__n
call fcn.004a827a
add esp, 8
lea eax, [ebp - 0xd4]
mov dword [ebp - 0xb4], 0x40
push eax
lea eax, [ebp - 0xb4]
mov dword [ebp - 0xd4], 0
push eax
lea eax, [ebp - 0x50]
push eax
push 0
push 5
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov dword [ebp - 0xc4], eax
test eax, eax
je 0x497723
lea eax, [ebp - 0x50]
push eax
call fcn.004ab2c2
add esp, 4
mov ebx, eax
jmp 0x497729
mov ebx, dword [ebp - 0xd0]
lea eax, [ebp - 0xc0]
push eax
push 1
push 0
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
je 0x497754
push eax
push str.CreateStreamOnHGlobal_failed__0x_.8X__n
call fcn.004a827a
add esp, 8
or esi, 0xffffffff
jmp 0x497885
push 0x1000
call fcn.004a633d
add esp, 4
mov dword [ebp - 0xb8], eax
lea eax, [ebp - 0xb4]
xor esi, esi
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x497830
mov ecx, 0x1000
jmp 0x497790
mov eax, dword [ebp - 0xb4]
test eax, eax
je 0x497830
cmp eax, 0x1000
cmova eax, ecx
add esi, eax
mov dword [ebp - 0xb4], eax
cmp dword [ebp - 0xc4], 0
je 0x4977d2
imul eax, esi, 0x64
xor edx, edx
push 0xd
div ebx
push eax
push ebx
push esi
push str.received__d_of__d___d____c
call fcn.004a827a
add esp, 0x14
jmp 0x4977e2
push 0xa
push esi
push str.received__d__unknown_length__c
call fcn.004a827a
add esp, 0xc
lea eax, [ebp - 0xb4]
push eax
push dword [ebp - 0xb4]
push dword [ebp - 0xb8]
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
mov eax, dword [ebp - 0xb4]
mov ecx, dword [ebp - 0xbc]
dec eax
push eax
push dword [ebp - 0xb8]
call fcn.00403130
lea eax, [ebp - 0xb4]
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
mov ecx, 0x1000
test eax, eax
jne 0x497790
push dword [ebp - 0xb8]
call fcn.004a861d
mov ecx, dword [ebp - 0xc0]
add esp, 4
test ecx, ecx
je 0x49784e
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push edi
call esi
push dword [ebp - 0xe0]
call esi
push dword [ebp - 0xd8]
call esi
mov ecx, dword [ebp - 0xbc]
push 0x4ef4d1
call fcn.0040f320
test eax, eax
jne 0x497880
or esi, 0xffffffff
jmp 0x497885
mov esi, 1
cmp dword [ebp - 0x9c], 8
jb 0x49789c
push dword [ebp - 0xb0]
call fcn.004a78e3
add esp, 4
xor eax, eax
mov dword [ebp - 0x9c], 7
cmp dword [ebp - 0x84], 8
mov dword [ebp - 0xa0], 0
mov word [ebp - 0xb0], ax
jb 0x4978d0
push dword [ebp - 0x98]
call fcn.004a78e3
add esp, 4
xor eax, eax
mov dword [ebp - 0x84], 7
mov dword [ebp - 0x88], 0
mov word [ebp - 0x98], ax
cmp dword [ebp - 0x54], 0x10
jb 0x4978fe
push dword [ebp - 0x68]
call fcn.004a78e3
add esp, 4
cmp dword [ebp - 0x6c], 0x10
mov dword [ebp - 0x54], 0xf
mov dword [ebp - 0x58], 0
mov byte [ebp - 0x68], 0
jb 0x497921
push dword [ebp - 0x80]
call fcn.004a78e3
add esp, 4
mov dword [ebp - 0x6c], 0xf
mov dword [ebp - 0x70], 0
mov byte [ebp - 0x80], 0
cmp dword [ebp + 0x1c], 0x10
jb 0x497944
push dword [ebp + 8]
call fcn.004a78e3
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a6d1e
mov esp, ebp
pop ebp
ret