Function at 0x45a97d
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
cmp dword [0x52b520], 0
jne 0x45a9a2
xor eax, eax
mov dword [esp + 4], eax
mov dword [esp], eax
call fcn.0045577a
mov dword [0x52b520], eax
mov dword [esp], 0x4b8
call sub.msvcrt.dll_malloc
mov dword [ebp - 0x3c], eax
test eax, eax
je 0x45aa73
mov dword [eax + 0x20], 2
mov dword [esp], 0x38
call sub.msvcrt.dll_malloc
mov ebx, eax
test eax, eax
je 0x45aa68
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 0x45aa60
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.00458ee3
mov ebx, dword [0x492b64]
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.0x45ad71.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 [0x52b4f4]
mov dword [esp], str._nError:_memory_allocation_error
test eax, eax
je 0x45aa8a
call eax
jmp 0x45ae77
call sub.msvcrt.dll_printf
mov dword [esp], 0xa
call sub.msvcrt.dll_putchar
jmp 0x45ae77
cmp ebx, 1
jne 0x45ac49
mov eax, dword [ebp - 0x20]
cmp eax, dword [0x492b64]
je 0x45ac8a
test ebx, ebx
jne 0x45acbe
mov eax, dword [ebp - 0x28]
cmp dword [ebp - 0x2c], eax
jne 0x45ac09
mov eax, dword [ebp + 8]
mov edx, dword [0x492b64]
mov eax, dword [eax + 8]
test eax, eax
jns 0x45aaea
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 9
jmp 0x45ab19
cmp dword [ebp - 0x40], 0
jne 0x45aafe
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 0xe
jmp 0x45ab19
mov ecx, dword [0x52b4e0]
test ecx, ecx
je 0x45ab25
cmp dword [ecx], 0
je 0x45ab25
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 4
mov dword [ebp - 0x28], 0xffffffff
jmp 0x45abc6
cmp eax, dword [0x492b68]
jne 0x45ab5d
mov eax, dword [0x52b480]
mov ecx, dword [0x52b484]
lea esi, [edx + eax]
cmp ecx, esi
jae 0x45ab43
mov edx, ecx
sub edx, eax
mov esi, dword [0x52b488]
mov edi, dword [ebp - 0x40]
mov ecx, edx
add esi, eax
add eax, edx
rep movsb byte es:[edi], byte [esi]
mov dword [0x52b480], eax
mov esi, edx
jmp 0x45ab8b
mov ecx, dword [0x52b4f0]
mov dword [esp + 8], edx
test ecx, ecx
je 0x45ab79
mov edx, dword [ebp - 0x40]
mov dword [esp], eax
mov dword [esp + 4], edx
call ecx
jmp 0x45ab89
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 0x45abc1
mov eax, esi
mov ecx, dword [0x52b4e8]
cdq
add eax, dword [0x52b4f8]
adc edx, dword [0x52b4fc]
mov dword [0x52b4f8], eax
mov dword [0x52b4fc], edx
test ecx, ecx
je 0x45abbc
mov dword [esp], eax
mov dword [esp + 4], edx
call ecx
mov dword [ebp - 0x28], esi
jmp 0x45ac04
mov dword [ebp - 0x28], esi
je 0x45ac04
mov esi, dword [0x52b4f4]
mov eax, dword [sym.imp.msvcrt.dll__errno]
test esi, esi
je 0x45abeb
call eax
mov eax, dword [eax]
mov dword [esp], str._nError:_read_error__errno:__d_
mov dword [esp + 4], eax
call esi
jmp 0x45adfc
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 0x45ade5
xor edi, edi
mov dword [ebp - 0x2c], edi
mov eax, dword [ebp - 0x3c]
cmp dword [eax + 0x20], 0
jne 0x45ac17
call fcn.00458ee3
mov eax, dword [ebp - 0x3c]
lea edx, [ebp - 0x30]
mov edi, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x20]
call fcn.00459fc9
mov ebx, eax
mov eax, dword [ebp - 0x3c]
cmp dword [eax + 0x20], 0
jne 0x45ac54
test ebx, ebx
jne 0x45aaa0
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 0x45aaa9
mov eax, dword [ebp - 0x20]
test ebx, ebx
jne 0x45ac7e
cmp edi, dword [ebp - 0x2c]
jne 0x45ac7e
cmp esi, eax
jne 0x45ac7e
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 0x45aaa9
mov eax, dword [ebp - 0x3c]
mov byte [eax + 0x24], 0
jmp 0x45aaa9
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.0045c1e0
cmp eax, 0xffffffe4
je 0x45adf3
test eax, eax
js 0x45ad16
cdq
add dword [ebp - 0x48], eax
adc dword [ebp - 0x44], edx
xor esi, esi
mov dword [ebp - 0x20], esi
jmp 0x45aab8
cmp ebx, 2
jne 0x45acf0
mov eax, dword [0x52b4f4]
mov dword [esp], str._nError:_unsupported_check__not_verifying_file_integrity
test eax, eax
je 0x45acda
call eax
jmp case.0x45ad71.9
call sub.msvcrt.dll_printf
mov dword [esp], 0xa
call sub.msvcrt.dll_putchar
jmp case.0x45ad71.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.0045c1e0
cmp eax, 0xffffffe4
je 0x45adf3
test eax, eax
jns 0x45ad62
mov ebx, dword [0x52b4f4]
mov eax, dword [sym.imp.msvcrt.dll__errno]
test ebx, ebx
je 0x45ad40
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 0x45adfc
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 0x45ad36
cdq
add dword [ebp - 0x48], eax
lea eax, [ebx - 1]
adc dword [ebp - 0x44], edx
cmp eax, 8
ja case.0x45ad71.2
jmp dword [eax*4 + 0x4b7328]
mov dword [esp], str._nError:_memory_allocation_error
mov eax, dword [0x52b4f4]
jmp 0x45add8
mov dword [esp], str._nError:_memory_usage_limit_error
mov eax, dword [0x52b4f4]
jmp 0x45add8
mov dword [esp], str._nError:_not_a_.xz_file
mov eax, dword [0x52b4f4]
jmp 0x45add8
mov dword [esp], str._nError:_unsupported_XZ_header_option
mov eax, dword [0x52b4f4]
jmp 0x45add8
mov dword [esp], str._nError:_corrupted_archive
mov eax, dword [0x52b4f4]
jmp 0x45add8
mov dword [esp], str._nError:_corrupted_buffer
mov eax, dword [0x52b4f4]
jmp 0x45add8
mov dword [esp], str._nError:_XZ_decompression_bug_
mov eax, dword [0x52b4f4]
test eax, eax
je 0x45ade0
call eax
jmp 0x45adfc
call sub.msvcrt.dll_printf
mov dword [esp], 0xa
call sub.msvcrt.dll_putchar
jmp 0x45adfc
mov ebx, 9
jmp 0x45adfc
xor ebx, ebx
mov eax, dword [ebp - 0x3c]
mov esi, dword [eax + 0x4a8]
cmp dword [esi + 0x3c], 0
je 0x45ae16
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 0x45ae8e
cmp ebx, 9
jne 0x45ae69
mov eax, dword [ebp + 8]
xor edx, edx
mov dword [ebp - 0x44], edx
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x48], eax
jmp 0x45ae8e
mov eax, ebx
xor ecx, ecx
neg eax
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x48], eax
jmp 0x45ae8e
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 0x45ae3a
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x44]
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret