Function at 0x454820
Capabilities:
Read http header
Receive http response
Write file on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e681d
mov eax, dword fs:[0]
push eax
push ecx
push ebx
sub esp, 0x188
mov eax, dword [0x521104]
xor eax, ebp
mov dword [ebp - 0x1c], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp - 0x4c], edi
mov dword [ebp - 4], 0
mov ecx, dword [edi + 0x3c]
mov eax, dword [edi + 0x40]
push 0
sub eax, ecx
mov dword [ebp - 0x50], edi
push eax
push eax
push ecx
push 0
push 0
push dword [edi + 0x10]
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x454bd4
mov eax, dword [edi + 0x24]
mov dword [ebp - 0x24], eax
mov eax, dword [edi + 0x14]
push 0xffffffffffffffff
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x24]
push 0
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, 0xffffffff
je 0x454bf0
test eax, eax
je 0x454c0f
mov eax, dword [edi + 0x28]
test eax, eax
jne 0x454c2c
push eax
push dword [edi + 0x10]
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x454c45
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x24]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, 0xffffffff
je 0x454c64
test eax, eax
je 0x454c83
mov eax, dword [edi + 0x28]
test eax, eax
jne 0x454ca0
push dword [edi + 0x18]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0xe
xorps xmm0, xmm0
mov dword [ebp - 0x38], 0
push str.Content_Length
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x34], 0
movups xmmword [ebp - 0x48], xmm0
call fcn.0040a370
lea eax, [ebp - 0x48]
mov byte [ebp - 4], 1
push eax
mov ecx, edi
call fcn.00455a60
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], edx
mov byte [ebp - 4], 0
call fcn.0040a450
cmp dword [edi + 0x4c], 0
je 0x4549ad
push 0
lea eax, [ebp - 0x30]
mov dword [ebp - 0x28], 0
push eax
lea eax, [ebp - 0x28]
mov dword [ebp - 0x30], 4
push eax
push 0
push 0x20000013
push dword [edi + 0x10]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x4549ad
mov edi, dword [edi + 0x4c]
push dword [ebp - 0x28]
mov eax, dword [edi]
mov esi, dword [eax]
mov ecx, esi
call dword [0x4ed33c]
mov ecx, edi
call esi
test al, al
je 0x454cb9
mov edi, dword [ebp - 0x4c]
cmp dword [edi + 0x48], 0
jne 0x4549c3
cmp dword [edi + 0x68], 0
jne 0x4549c3
cmp dword [edi + 0x4c], 0
je 0x454ba0
push ecx
push dword [edi + 0x54]
xorps xmm0, xmm0
mov dword [ebp - 0x34], 0
lea ecx, [ebp - 0x3c]
movq qword [ebp - 0x3c], xmm0
call fcn.00455ba0
or esi, 0xffffffff
mov dword [ebp - 0x30], esi
mov byte [ebp - 4], 3
cmp dword [edi + 0x68], 0
je 0x454a22
cmp dword [edi + 0x6c], 8
lea eax, [edi + 0x58]
mov dword [ebp - 0x28], eax
mov ecx, eax
jb 0x4549fe
mov ecx, dword [eax]
push 0
push 0x80
push 4
push 0
push 5
push 4
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x30], esi
cmp esi, 0xffffffff
je 0x454cd6
push 0
push dword [edi + 0x54]
push dword [ebp - 0x3c]
push dword [edi + 0x10]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x454d09
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x24]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, 0xffffffff
je 0x454d28
test eax, eax
je 0x454d47
mov eax, dword [edi + 0x28]
test eax, eax
jne 0x454d64
mov eax, dword [edi + 0x4c]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x454b1e
mov eax, dword [eax]
push 0
mov edi, dword [eax + 4]
mov ecx, edi
mov eax, dword [ebp - 0x4c]
add eax, 0x2c
mov dword [ebp - 0x28], eax
push dword [eax]
push dword [ebp - 0x3c]
call dword [0x4ed33c]
mov ecx, dword [ebp - 0x2c]
call edi
test al, al
je 0x454d7d
mov edi, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x28]
mov edx, dword [edi + 0x70]
mov ecx, dword [eax]
add edx, ecx
mov eax, dword [edi + 0x74]
mov dword [edi + 0x70], edx
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x454ad6
push dword [ebp - 0x54]
mov eax, dword [eax]
push dword [ebp - 0x58]
push edx
mov edi, dword [eax + 4]
push ecx
mov ecx, edi
call dword [0x4ed33c]
mov ecx, dword [ebp - 0x2c]
call edi
mov edi, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x28]
cmp dword [eax], 0
ja 0x454a22
cmp esi, 0xffffffff
je 0x454aee
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x454ba0
mov edx, dword [ebp - 0x34]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x454b79
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x454d9a
jmp 0x454b79
mov ecx, dword [edi + 0x48]
test ecx, ecx
je 0x454b40
mov edx, dword [edi + 0x2c]
lea eax, [edi + 0x2c]
push edx
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x3c]
push eax
push dword [ecx + 4]
call fcn.00449ce0
mov ecx, dword [ebp - 0x28]
jmp 0x454b46
lea ecx, [edi + 0x2c]
mov dword [ebp - 0x28], ecx
cmp esi, 0xffffffff
je 0x454aa2
mov eax, dword [ecx]
push 0
mov dword [ebp - 0x28], ecx
lea ecx, [ebp - 0x2c]
push ecx
push eax
push dword [ebp - 0x3c]
mov dword [ebp - 0x2c], 0
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x454d9f
jmp 0x454aa2
push edx
push ecx
call fcn.004a38d3
add esp, 8
jmp 0x454ba0
push dword [edi + 0x18]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
je 0x454bb6
push dword [edi + 0x1c]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.004a389b
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x70]
call fcn.004910b0
push 0x51dce8
mov eax, ecx
push eax
call fcn.004a629b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x84]
call fcn.004910b0
push 0x51dce8
mov eax, ecx
push eax
call fcn.004a629b
push 0x2ef1
lea ecx, [ebp - 0x98]
call fcn.004910b0
push 0x51dce8
mov eax, ecx
push eax
call fcn.004a629b
push eax
lea ecx, [ebp - 0xac]
call fcn.004910b0
push 0x51dce8
mov eax, ecx
push eax
call fcn.004a629b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0xc0]
call fcn.004910b0
push 0x51dce8
mov eax, ecx
push eax
call fcn.004a629b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0xd4]
call fcn.004910b0
push 0x51dce8
mov eax, ecx
push eax
call fcn.004a629b
push 0x2ef1
lea ecx, [ebp - 0xe8]
call fcn.004910b0
push 0x51dce8
mov eax, ecx
push eax
call fcn.004a629b
push eax
lea ecx, [ebp - 0xfc]
call fcn.004910b0
push 0x51dce8
mov eax, ecx
push eax
call fcn.004a629b
push 0x2ef1
lea ecx, [ebp - 0x110]
call fcn.004910b0
push 0x51dce8
mov eax, ecx
push eax
call fcn.004a629b
mov ecx, dword [ebp - 0x28]
call fcn.0040a4f0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
push str.Unable_to_open_file__s_
push eax
lea ecx, [ebp - 0x124]
call fcn.00413400
push 0x51dce8
lea eax, [ebp - 0x124]
push eax
call fcn.004a629b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x138]
call fcn.004910b0
push 0x51dce8
mov eax, ecx
push eax
call fcn.004a629b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x14c]
call fcn.004910b0
push 0x51dce8
mov eax, ecx
push eax
call fcn.004a629b
push 0x2ef1
lea ecx, [ebp - 0x160]
call fcn.004910b0
push 0x51dce8
mov eax, ecx
push eax
call fcn.004a629b
push eax
lea ecx, [ebp - 0x174]
call fcn.004910b0
push 0x51dce8
mov eax, ecx
push eax
call fcn.004a629b
push 0x2ef1
lea ecx, [ebp - 0x188]
call fcn.004910b0
push 0x51dce8
mov eax, ecx
push eax
call fcn.004a629b
call fcn.004b013f
push str.Unable_to_write_to_the_file_
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x19c]
call fcn.00491170
push 0x51dce8
lea eax, [ebp - 0x19c]
push eax
call fcn.004a629b
int3