Function at 0x497af0
Capabilities:
Initialize winhttp library
Prepare http request
Read http header
Receive http response
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e2a19
mov eax, dword fs:[0]
push eax
sub esp, 0xe0
mov eax, dword [0x50c7c4]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov eax, ecx
mov dword [ebp - 0xbc], eax
test eax, eax
je 0x497fc1
test esi, esi
je 0x497fc1
push 0x4ef4d1
lea ecx, [ebp - 0xb4]
call fcn.00403030
push 0x4ef4d1
lea ecx, [ebp - 0x9c]
mov dword [ebp - 4], 0
call fcn.00403030
lea eax, [ebp - 0x9c]
mov byte [ebp - 4], 1
push eax
lea edx, [ebp - 0xb4]
mov ecx, esi
call fcn.00497970
add esp, 4
test al, al
jne 0x497b85
xor esi, esi
jmp 0x497f74
lea edx, [ebp - 0xb4]
lea ecx, [ebp - 0x84]
call fcn.00424170
lea edx, [ebp - 0x9c]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x6c]
call fcn.00424170
push 0
push 0
push 0
push 0
mov byte [ebp - 4], 3
push str.Aurora_Console_App
mov dword [ebp - 0xc4], 0
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ecx, eax
mov dword [ebp - 0xdc], ecx
test ecx, ecx
jne 0x497bf0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WinHttpOpen_failed__0x_.8X__n
call fcn.004a827a
add esp, 8
xor esi, esi
jmp 0x497f24
cmp dword [ebp - 0x70], 8
lea eax, [ebp - 0x84]
push 0
cmovae eax, dword [ebp - 0x84]
push 0x1bb
push eax
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ecx, eax
mov dword [ebp - 0xe4], ecx
test ecx, ecx
jne 0x497c37
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WinHttpConnect_failed__0x_.8X__n
call fcn.004a827a
add esp, 8
xor esi, esi
jmp 0x497f24
cmp dword [ebp - 0x58], 8
lea edx, [ebp - 0xec]
push 0x800000
push edx
push 0
push 0
lea eax, [ebp - 0x6c]
mov dword [ebp - 0xec], str.text_html
cmovae eax, dword [ebp - 0x6c]
push eax
push 0x4f7738
push ecx
mov dword [ebp - 0xe8], 0
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
test esi, esi
jne 0x497c92
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WinHttpOpenRequest_failed__0x_.8X__n
call fcn.004a827a
add esp, 8
jmp 0x497f24
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpQueryOption]
lea eax, [ebp - 0xe0]
push eax
lea eax, [ebp - 0xcc]
mov dword [ebp - 0xe0], 4
push eax
push 0x1f
push esi
call edi
push 4
lea eax, [ebp - 0xcc]
push eax
push 0x1f
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
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 0x497cf9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WinHttpSendRequest_failed___d__n
call fcn.004a827a
add esp, 8
xor esi, esi
jmp 0x497f24
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x497d21
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WinHttpReceiveResponse_failed__0x_.8X__n
call fcn.004a827a
add esp, 8
xor esi, esi
jmp 0x497f24
lea eax, [ebp - 0xd0]
mov dword [ebp - 0xd0], 4
push eax
lea eax, [ebp - 0xd4]
push eax
push 0x4e
push esi
call edi
test eax, eax
jne 0x497d56
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 - 0xd8]
mov dword [ebp - 0xb8], 0x40
push eax
lea eax, [ebp - 0xb8]
mov dword [ebp - 0xd8], 0
push eax
lea eax, [ebp - 0x54]
push eax
push 0
push 5
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov dword [ebp - 0xc8], eax
test eax, eax
je 0x497d9f
lea eax, [ebp - 0x54]
push eax
call fcn.004ab2c2
add esp, 4
jmp 0x497da5
mov eax, dword [ebp - 0xd4]
mov dword [ebp - 0xc0], eax
lea eax, [ebp - 0xc4]
push eax
push 1
push 0
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
je 0x497dd5
push eax
push str.CreateStreamOnHGlobal_failed__0x_.8X__n
call fcn.004a827a
add esp, 8
xor esi, esi
jmp 0x497f24
push 0x1000
call fcn.004a633d
add esp, 4
mov ebx, eax
push 0x4fce30
push dword [ebp - 0xbc]
call fcn.004ab3a3
add esp, 8
mov dword [ebp - 0xbc], eax
test eax, eax
jne 0x497e1a
push eax
call fcn.004a9dc6
add esp, 4
push ebx
call fcn.004a861d
add esp, 4
xor esi, esi
jmp 0x497f24
lea eax, [ebp - 0xb8]
xor edi, edi
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x497edf
mov ecx, 0x1000
jmp 0x497e40
mov eax, dword [ebp - 0xb8]
test eax, eax
je 0x497edf
cmp eax, 0x1000
cmova eax, ecx
add edi, eax
mov dword [ebp - 0xb8], eax
cmp dword [ebp - 0xc8], 0
je 0x497e88
mov ecx, dword [ebp - 0xc0]
xor edx, edx
imul eax, edi, 0x64
push 0xd
div ecx
push eax
push ecx
push edi
push str.received__d_of__d___d____c
call fcn.004a827a
add esp, 0x14
jmp 0x497e98
push 0xa
push edi
push str.received__d__unknown_length__c
call fcn.004a827a
add esp, 0xc
lea eax, [ebp - 0xb8]
push eax
push dword [ebp - 0xb8]
push ebx
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
push dword [ebp - 0xbc]
push dword [ebp - 0xb8]
push 1
push ebx
call fcn.004a9cd8
add esp, 0x10
lea eax, [ebp - 0xb8]
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
mov ecx, 0x1000
test eax, eax
jne 0x497e40
push ebx
call fcn.004a861d
add esp, 4
push dword [ebp - 0xbc]
call fcn.004a9dc6
mov ecx, dword [ebp - 0xc4]
add esp, 4
test ecx, ecx
je 0x497f06
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push dword [ebp - 0xe4]
call esi
push dword [ebp - 0xdc]
call esi
mov esi, 1
cmp dword [ebp - 0x58], 8
jb 0x497f35
push dword [ebp - 0x6c]
call fcn.004a78e3
add esp, 4
xor eax, eax
mov dword [ebp - 0x58], 7
cmp dword [ebp - 0x70], 8
mov dword [ebp - 0x5c], 0
mov word [ebp - 0x6c], ax
jb 0x497f5d
push dword [ebp - 0x84]
call fcn.004a78e3
add esp, 4
xor eax, eax
mov dword [ebp - 0x70], 7
mov dword [ebp - 0x74], 0
mov word [ebp - 0x84], ax
cmp dword [ebp - 0x88], 0x10
jb 0x497f8b
push dword [ebp - 0x9c]
call fcn.004a78e3
add esp, 4
cmp dword [ebp - 0xa0], 0x10
mov dword [ebp - 0x88], 0xf
mov dword [ebp - 0x8c], 0
mov byte [ebp - 0x9c], 0
jb 0x497fbd
push dword [ebp - 0xb4]
call fcn.004a78e3
add esp, 4
mov eax, esi
jmp 0x497fc4
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004a6d1e
mov esp, ebp
pop ebp
ret