Function at 0x4522c0
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 0x4e325d
mov eax, dword fs:[0]
push eax
push ecx
push ebx
sub esp, 0x188
mov eax, dword [0x51c100]
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 0x452674
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 0x452690
test eax, eax
je 0x4526af
mov eax, dword [edi + 0x28]
test eax, eax
jne 0x4526cc
push eax
push dword [edi + 0x10]
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x4526e5
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x24]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, 0xffffffff
je 0x452704
test eax, eax
je 0x452723
mov eax, dword [edi + 0x28]
test eax, eax
jne 0x452740
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.0040a4a0
lea eax, [ebp - 0x48]
mov byte [ebp - 4], 1
push eax
mov ecx, edi
call fcn.00453500
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], edx
mov byte [ebp - 4], 0
call fcn.0040a590
cmp dword [edi + 0x4c], 0
je 0x45244d
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 0x45244d
mov edi, dword [edi + 0x4c]
push dword [ebp - 0x28]
mov eax, dword [edi]
mov esi, dword [eax]
mov ecx, esi
call dword [0x4e933c]
mov ecx, edi
call esi
test al, al
je 0x452759
mov edi, dword [ebp - 0x4c]
cmp dword [edi + 0x48], 0
jne 0x452463
cmp dword [edi + 0x68], 0
jne 0x452463
cmp dword [edi + 0x4c], 0
je 0x452640
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.00453640
or esi, 0xffffffff
mov dword [ebp - 0x30], esi
mov byte [ebp - 4], 3
cmp dword [edi + 0x68], 0
je 0x4524c2
cmp dword [edi + 0x6c], 8
lea eax, [edi + 0x58]
mov dword [ebp - 0x28], eax
mov ecx, eax
jb 0x45249e
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 0x452776
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 0x4527a9
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x24]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, 0xffffffff
je 0x4527c8
test eax, eax
je 0x4527e7
mov eax, dword [edi + 0x28]
test eax, eax
jne 0x452804
mov eax, dword [edi + 0x4c]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x4525be
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 [0x4e933c]
mov ecx, dword [ebp - 0x2c]
call edi
test al, al
je 0x45281d
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 0x452576
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 [0x4e933c]
mov ecx, dword [ebp - 0x2c]
call edi
mov edi, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x28]
cmp dword [eax], 0
ja 0x4524c2
cmp esi, 0xffffffff
je 0x45258e
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x452640
mov edx, dword [ebp - 0x34]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x452619
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x45283a
jmp 0x452619
mov ecx, dword [edi + 0x48]
test ecx, ecx
je 0x4525e0
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.00448200
mov ecx, dword [ebp - 0x28]
jmp 0x4525e6
lea ecx, [edi + 0x2c]
mov dword [ebp - 0x28], ecx
cmp esi, 0xffffffff
je 0x452542
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 0x45283f
jmp 0x452542
push edx
push ecx
call fcn.004a05b3
add esp, 8
jmp 0x452640
push dword [edi + 0x18]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
je 0x452656
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.004a057b
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.0048de30
push 0x518f50
mov eax, ecx
push eax
call fcn.004a2f8b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x84]
call fcn.0048de30
push 0x518f50
mov eax, ecx
push eax
call fcn.004a2f8b
push 0x2ef1
lea ecx, [ebp - 0x98]
call fcn.0048de30
push 0x518f50
mov eax, ecx
push eax
call fcn.004a2f8b
push eax
lea ecx, [ebp - 0xac]
call fcn.0048de30
push 0x518f50
mov eax, ecx
push eax
call fcn.004a2f8b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0xc0]
call fcn.0048de30
push 0x518f50
mov eax, ecx
push eax
call fcn.004a2f8b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0xd4]
call fcn.0048de30
push 0x518f50
mov eax, ecx
push eax
call fcn.004a2f8b
push 0x2ef1
lea ecx, [ebp - 0xe8]
call fcn.0048de30
push 0x518f50
mov eax, ecx
push eax
call fcn.004a2f8b
push eax
lea ecx, [ebp - 0xfc]
call fcn.0048de30
push 0x518f50
mov eax, ecx
push eax
call fcn.004a2f8b
push 0x2ef1
lea ecx, [ebp - 0x110]
call fcn.0048de30
push 0x518f50
mov eax, ecx
push eax
call fcn.004a2f8b
mov ecx, dword [ebp - 0x28]
call fcn.0040a630
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.00413770
push 0x518f50
lea eax, [ebp - 0x124]
push eax
call fcn.004a2f8b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x138]
call fcn.0048de30
push 0x518f50
mov eax, ecx
push eax
call fcn.004a2f8b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x14c]
call fcn.0048de30
push 0x518f50
mov eax, ecx
push eax
call fcn.004a2f8b
push 0x2ef1
lea ecx, [ebp - 0x160]
call fcn.0048de30
push 0x518f50
mov eax, ecx
push eax
call fcn.004a2f8b
push eax
lea ecx, [ebp - 0x174]
call fcn.0048de30
push 0x518f50
mov eax, ecx
push eax
call fcn.004a2f8b
push 0x2ef1
lea ecx, [ebp - 0x188]
call fcn.0048de30
push 0x518f50
mov eax, ecx
push eax
call fcn.004a2f8b
call fcn.004ace5f
push 0x5030e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x19c]
call fcn.0048def0
push 0x518f50
lea eax, [ebp - 0x19c]
push eax
call fcn.004a2f8b
int3