Function at 0x457885
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
cmp dword [0x528960], 0
jne 0x4578aa
xor eax, eax
mov dword [esp + 4], eax
mov dword [esp], eax
call fcn.0045266a
mov dword [0x528960], eax
mov dword [esp], 0x4b8
call sub.msvcrt.dll_malloc
mov dword [ebp - 0x3c], eax
test eax, eax
je 0x45797b
mov dword [eax + 0x20], 2
mov dword [esp], 0x38
call sub.msvcrt.dll_malloc
mov ebx, eax
test eax, eax
je 0x457970
mov byte [eax + 8], 0
mov eax, dword [ebp - 0x3c]
mov dword [eax + 0x4ac], ebx
mov dword [esp], 0x6f28
call sub.msvcrt.dll_malloc
test eax, eax
je 0x457968
mov edi, dword [ebp - 0x3c]
xor edx, edx
mov dword [eax + 0x3c], 2
xor esi, esi
mov dword [eax + 0x18], edx
mov dword [eax + 0x38], edx
mov dword [edi + 0x4a8], eax
mov dword [eax + 0x34], 0x4000000
mov eax, edi
xor edi, edi
call fcn.00455deb
mov ebx, dword [0x48fd04]
mov dword [esp], ebx
call sub.msvcrt.dll_malloc
mov dword [esp], ebx
mov dword [ebp - 0x40], eax
call sub.msvcrt.dll_malloc
xor ecx, ecx
mov dword [ebp - 0x1c], ebx
mov ebx, 1
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x44], edi
jmp case.0x457c79.9
mov dword [esp], ebx
call sub.msvcrt.dll_free
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [0x528934]
mov dword [esp], str._nError:_memory_allocation_error
test eax, eax
je 0x457992
call eax
jmp 0x457d7f
call sub.msvcrt.dll_printf
mov dword [esp], 0xa
call sub.msvcrt.dll_putchar
jmp 0x457d7f
cmp ebx, 1
jne 0x457b51
mov eax, dword [ebp - 0x20]
cmp eax, dword [0x48fd04]
je 0x457b92
test ebx, ebx
jne 0x457bc6
mov eax, dword [ebp - 0x28]
cmp dword [ebp - 0x2c], eax
jne 0x457b11
mov eax, dword [ebp + 8]
mov edx, dword [0x48fd04]
mov eax, dword [eax + 8]
test eax, eax
jns 0x4579f2
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 9
jmp 0x457a21
cmp dword [ebp - 0x40], 0
jne 0x457a06
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 0xe
jmp 0x457a21
mov ecx, dword [0x528920]
test ecx, ecx
je 0x457a2d
cmp dword [ecx], 0
je 0x457a2d
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 4
mov dword [ebp - 0x28], 0xffffffff
jmp 0x457ace
cmp eax, dword [0x48fd08]
jne 0x457a65
mov eax, dword [0x5288c0]
mov ecx, dword [0x5288c4]
lea esi, [edx + eax]
cmp ecx, esi
jae 0x457a4b
mov edx, ecx
sub edx, eax
mov esi, dword [0x5288c8]
mov edi, dword [ebp - 0x40]
mov ecx, edx
add esi, eax
add eax, edx
rep movsb byte es:[edi], byte [esi]
mov dword [0x5288c0], eax
mov esi, edx
jmp 0x457a93
mov ecx, dword [0x528930]
mov dword [esp + 8], edx
test ecx, ecx
je 0x457a81
mov edx, dword [ebp - 0x40]
mov dword [esp], eax
mov dword [esp + 4], edx
call ecx
jmp 0x457a91
mov ecx, dword [ebp - 0x40]
mov dword [esp], eax
mov dword [esp + 4], ecx
call dword [sym.imp.msvcrt.dll__read]
mov esi, eax
test esi, esi
jle 0x457ac9
mov eax, esi
mov ecx, dword [0x528928]
cdq
add eax, dword [0x528938]
adc edx, dword [0x52893c]
mov dword [0x528938], eax
mov dword [0x52893c], edx
test ecx, ecx
je 0x457ac4
mov dword [esp], eax
mov dword [esp + 4], edx
call ecx
mov dword [ebp - 0x28], esi
jmp 0x457b0c
mov dword [ebp - 0x28], esi
je 0x457b0c
mov esi, dword [0x528934]
mov eax, dword [sym.imp.msvcrt.dll__errno]
test esi, esi
je 0x457af3
call eax
mov eax, dword [eax]
mov dword [esp], str._nError:_read_error__errno:__d_
mov dword [esp + 4], eax
call esi
jmp 0x457d04
call eax
mov eax, dword [eax]
mov dword [esp], str._nError:_read_error__errno:__d_
mov dword [esp + 4], eax
call sub.msvcrt.dll_printf
jmp 0x457ced
xor edi, edi
mov dword [ebp - 0x2c], edi
mov eax, dword [ebp - 0x3c]
cmp dword [eax + 0x20], 0
jne 0x457b1f
call fcn.00455deb
mov eax, dword [ebp - 0x3c]
lea edx, [ebp - 0x30]
mov edi, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x20]
call fcn.00456ed1
mov ebx, eax
mov eax, dword [ebp - 0x3c]
cmp dword [eax + 0x20], 0
jne 0x457b5c
test ebx, ebx
jne 0x4579a8
xor ebx, ebx
mov eax, dword [ebp - 0x28]
cmp dword [ebp - 0x2c], eax
setne bl
add ebx, 7
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x20], esi
jmp 0x4579b1
mov eax, dword [ebp - 0x20]
test ebx, ebx
jne 0x457b86
cmp edi, dword [ebp - 0x2c]
jne 0x457b86
cmp esi, eax
jne 0x457b86
mov eax, dword [ebp - 0x3c]
movzx eax, byte [eax + 0x24]
lea ebx, [eax*8]
mov eax, dword [ebp - 0x3c]
mov byte [eax + 0x24], 1
jmp 0x4579b1
mov eax, dword [ebp - 0x3c]
mov byte [eax + 0x24], 0
jmp 0x4579b1
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004590e8
cmp eax, 0xffffffe4
je 0x457cfb
test eax, eax
js 0x457c1e
cdq
add dword [ebp - 0x48], eax
adc dword [ebp - 0x44], edx
xor esi, esi
mov dword [ebp - 0x20], esi
jmp 0x4579c0
cmp ebx, 2
jne 0x457bf8
mov eax, dword [0x528934]
mov dword [esp], str._nError:_unsupported_check__not_verifying_file_integrity
test eax, eax
je 0x457be2
call eax
jmp case.0x457c79.9
call sub.msvcrt.dll_printf
mov dword [esp], 0xa
call sub.msvcrt.dll_putchar
jmp case.0x457c79.9
mov eax, dword [ebp - 0x20]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004590e8
cmp eax, 0xffffffe4
je 0x457cfb
test eax, eax
jns 0x457c6a
mov ebx, dword [0x528934]
mov eax, dword [sym.imp.msvcrt.dll__errno]
test ebx, ebx
je 0x457c48
call eax
mov eax, dword [eax]
mov dword [esp], str._nError:_write_error__errno:__d_
mov dword [esp + 4], eax
call ebx
mov ebx, 7
jmp 0x457d04
call eax
mov eax, dword [eax]
mov dword [esp], str._nError:_write_error__errno:__d_
mov dword [esp + 4], eax
call sub.msvcrt.dll_printf
mov dword [esp], 0xa
call sub.msvcrt.dll_putchar
jmp 0x457c3e
cdq
add dword [ebp - 0x48], eax
lea eax, [ebx - 1]
adc dword [ebp - 0x44], edx
cmp eax, 8
ja case.0x457c79.2
jmp dword [eax*4 + 0x4b4610]
mov dword [esp], str._nError:_memory_allocation_error
mov eax, dword [0x528934]
jmp 0x457ce0
mov dword [esp], str._nError:_memory_usage_limit_error
mov eax, dword [0x528934]
jmp 0x457ce0
mov dword [esp], str._nError:_not_a_.xz_file
mov eax, dword [0x528934]
jmp 0x457ce0
mov dword [esp], str._nError:_unsupported_XZ_header_option
mov eax, dword [0x528934]
jmp 0x457ce0
mov dword [esp], str._nError:_corrupted_archive
mov eax, dword [0x528934]
jmp 0x457ce0
mov dword [esp], str._nError:_corrupted_buffer
mov eax, dword [0x528934]
jmp 0x457ce0
mov dword [esp], str._nError:_XZ_decompression_bug_
mov eax, dword [0x528934]
test eax, eax
je 0x457ce8
call eax
jmp 0x457d04
call sub.msvcrt.dll_printf
mov dword [esp], 0xa
call sub.msvcrt.dll_putchar
jmp 0x457d04
mov ebx, 9
jmp 0x457d04
xor ebx, ebx
mov eax, dword [ebp - 0x3c]
mov esi, dword [eax + 0x4a8]
cmp dword [esi + 0x3c], 0
je 0x457d1e
mov eax, dword [esi + 0x18]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov dword [esp], esi
call sub.msvcrt.dll_free
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x4ac]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call sub.msvcrt.dll_free
test ebx, ebx
je 0x457d96
cmp ebx, 9
jne 0x457d71
mov eax, dword [ebp + 8]
xor edx, edx
mov dword [ebp - 0x44], edx
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x48], eax
jmp 0x457d96
mov eax, ebx
xor ecx, ecx
neg eax
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x48], eax
jmp 0x457d96
xor eax, eax
xor edx, edx
mov ebx, 1
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x44], edx
jmp 0x457d42
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x44]
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret