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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cd908
mov eax, dword fs:[0]
push eax
sub esp, 0x184
mov eax, dword [0x505034]
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 dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp - 4], 0
mov ecx, dword [edi + 0x3c]
mov eax, dword [edi + 0x40]
push 0
sub eax, ecx
mov dword [ebp - 0x44], 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 0x455d78
mov eax, dword [edi + 0x24]
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov dword [ebp - 0x1c], eax
mov eax, dword [edi + 0x14]
push 0xffffffffffffffff
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x1c]
push 0
push eax
push 2
call ebx
cmp eax, 0xffffffff
je 0x455d94
test eax, eax
je 0x455db0
mov eax, dword [edi + 0x28]
test eax, eax
jne 0x455dcd
push eax
push dword [edi + 0x10]
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x455de6
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x1c]
push eax
push 2
call ebx
cmp eax, 0xffffffff
je 0x455e05
test eax, eax
je 0x455e24
mov eax, dword [edi + 0x28]
test eax, eax
jne 0x455e41
push dword [edi + 0x18]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0xe
xor eax, eax
mov dword [ebp - 0x30], 0
push str.Content_Length
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
call fcn.00415170
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 1
push eax
mov ecx, edi
call fcn.00456f20
mov dword [ebp - 0x4c], edx
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x48], eax
cmp edx, 8
jb 0x455b32
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x455b28
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x455e5a
push edx
push ecx
call fcn.00479e95
add esp, 8
cmp dword [edi + 0x4c], 0
je 0x455b78
push 0
lea eax, [ebp - 0x28]
mov dword [ebp - 0x20], 0
push eax
lea eax, [ebp - 0x20]
mov dword [ebp - 0x28], 4
push eax
push 0
push 0x20000013
push dword [edi + 0x10]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x455b78
mov ecx, dword [edi + 0x4c]
push dword [ebp - 0x20]
mov eax, dword [ecx]
mov eax, dword [eax]
call eax
test al, al
je 0x455e5f
cmp dword [edi + 0x48], 0
jne 0x455b8e
cmp dword [edi + 0x68], 0
jne 0x455b8e
cmp dword [edi + 0x4c], 0
je 0x455d48
mov esi, dword [edi + 0x54]
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x20], eax
xorps xmm0, xmm0
movq qword [ebp - 0x34], xmm0
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], eax
test esi, esi
je 0x455be3
cmp esi, 0x7fffffff
ja 0x455e7c
push esi
lea ecx, [ebp - 0x34]
call fcn.00422590
push esi
push ebx
mov ebx, dword [ebp - 0x34]
push ebx
call fcn.004928b0
lea eax, [ebx + esi]
add esp, 0xc
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x20], eax
or esi, 0xffffffff
mov dword [ebp - 0x28], esi
mov byte [ebp - 4], 3
cmp dword [edi + 0x68], 0
je 0x455c27
cmp dword [edi + 0x6c], 8
lea eax, [edi + 0x58]
mov dword [ebp - 0x24], eax
mov ecx, eax
jb 0x455c03
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 - 0x28], esi
cmp esi, 0xffffffff
je 0x455e81
push 0
push dword [edi + 0x54]
push ebx
push dword [edi + 0x10]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x455eb0
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x1c]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, 0xffffffff
je 0x455ecf
test eax, eax
je 0x455eee
mov eax, dword [edi + 0x28]
test eax, eax
jne 0x455f0b
mov ecx, dword [edi + 0x4c]
test ecx, ecx
je 0x455c88
mov eax, dword [ecx]
push 0
push dword [edi + 0x2c]
mov eax, dword [eax + 4]
push ebx
call eax
test al, al
je 0x455f24
jmp 0x455cc6
mov ecx, dword [edi + 0x48]
test ecx, ecx
je 0x455ca1
push dword [ebp - 0x48]
mov eax, dword [edi + 0x2c]
add eax, ebx
push eax
push ebx
push dword [ecx + 4]
call fcn.00457040
cmp esi, 0xffffffff
je 0x455cc6
push 0
lea eax, [ebp - 0x24]
mov dword [ebp - 0x24], 0
push eax
push dword [edi + 0x2c]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x455f41
mov eax, dword [edi + 0x70]
mov edx, dword [edi + 0x2c]
add eax, edx
mov ecx, dword [edi + 0x74]
mov dword [ebp - 0x24], eax
mov dword [edi + 0x70], eax
test ecx, ecx
je 0x455cea
push dword [ebp - 0x4c]
mov eax, dword [ecx]
push dword [ebp - 0x48]
push dword [ebp - 0x24]
push edx
call dword [eax + 4]
cmp dword [edi + 0x2c], 0
ja 0x455c27
cmp esi, 0xffffffff
je 0x455d00
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x455d48
mov ecx, dword [ebp - 0x20]
mov eax, ebx
sub ecx, ebx
cmp ecx, 0x1000
jb 0x455d27
mov ebx, dword [ebx - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x455f69
push ecx
push ebx
call fcn.00479e95
add esp, 8
jmp 0x455d48
push dword [edi + 0x18]
mov ebx, dword [sym.imp.KERNEL32.dll_SetEvent]
call ebx
test eax, eax
je 0x455d5c
push dword [edi + 0x1c]
call ebx
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.00479e61
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x64]
call fcn.0046c5f0
push 0x50271c
mov eax, ecx
push eax
call fcn.00491d27
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x78]
call fcn.0046c5f0
push 0x50271c
mov eax, ecx
push eax
call fcn.00491d27
push 0x2ef1
lea ecx, [ebp - 0x8c]
call fcn.0046c5f0
push 0x50271c
mov eax, ecx
push eax
call fcn.00491d27
push eax
lea ecx, [ebp - 0xa0]
call fcn.0046c5f0
push 0x50271c
mov eax, ecx
push eax
call fcn.00491d27
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0xb4]
call fcn.0046c5f0
push 0x50271c
mov eax, ecx
push eax
call fcn.00491d27
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0xc8]
call fcn.0046c5f0
push 0x50271c
mov eax, ecx
push eax
call fcn.00491d27
push 0x2ef1
lea ecx, [ebp - 0xdc]
call fcn.0046c5f0
push 0x50271c
mov eax, ecx
push eax
call fcn.00491d27
push eax
lea ecx, [ebp - 0xf0]
call fcn.0046c5f0
push 0x50271c
mov eax, ecx
push eax
call fcn.00491d27
call fcn.0049b19a
push 0x2ef1
lea ecx, [ebp - 0x104]
call fcn.0046c5f0
push 0x50271c
mov eax, ecx
push eax
call fcn.00491d27
call fcn.00416f90
mov ecx, dword [ebp - 0x24]
call fcn.00414fe0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
push ecx
push eax
lea ecx, [ebp - 0x118]
call fcn.0043ebc0
push 0x50271c
lea eax, [ebp - 0x118]
push eax
call fcn.00491d27
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x12c]
call fcn.0046c5f0
push 0x50271c
mov eax, ecx
push eax
call fcn.00491d27
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x140]
call fcn.0046c5f0
push 0x50271c
mov eax, ecx
push eax
call fcn.00491d27
push 0x2ef1
lea ecx, [ebp - 0x154]
call fcn.0046c5f0
push 0x50271c
mov eax, ecx
push eax
call fcn.00491d27
push eax
lea ecx, [ebp - 0x168]
call fcn.0046c5f0
push 0x50271c
mov eax, ecx
push eax
call fcn.00491d27
push 0x2ef1
lea ecx, [ebp - 0x17c]
call fcn.0046c5f0
push 0x50271c
mov eax, ecx
push eax
call fcn.00491d27
push str.Unable_to_write_to_the_file_
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x190]
call fcn.0046c6b0
push 0x50271c
lea eax, [ebp - 0x190]
push eax
call fcn.00491d27
call fcn.0049b19a
int3