Function at 0x4040be
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1454
call fcn.00524dc0
mov eax, dword [0x5c4e68]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x1410], eax
mov eax, dword [ebp + 0xc]
xor ebx, ebx
mov esi, 0x7ff
push esi
mov dword [ebp - 0x1440], eax
lea eax, [ebp - 0x807]
push ebx
push eax
mov dword [ebp - 0x1420], ebx
mov dword [ebp - 0x142c], ebx
mov byte [ebp - 0x808], bl
call fcn.005117f0
add esp, 0xc
push esi
lea eax, [ebp - 0x1007]
push ebx
push eax
mov byte [ebp - 0x1008], bl
call fcn.005117f0
mov edx, dword [ebp - 0x1410]
xor eax, eax
lea edi, [ebp - 0x144c]
add esp, 0xc
mov dword [ebp - 0x1450], ebx
mov dword [ebp - 0x141c], ebx
mov dword [ebp - 0x1444], ebx
mov dword [ebp - 0x1434], ebx
mov dword [ebp - 0x143c], ebx
mov dword [ebp - 0x1428], ebx
stosd dword es:[edi], eax
mov dword [ebp - 0x1448], ebx
call fcn.004c3b34
test eax, eax
je 0x404174
xor eax, eax
jmp 0x404c7d
push dword [ebp - 0x1410]
mov edi, 0x800
mov ecx, edi
lea eax, [ebp - 0x1008]
call fcn.004c3b66
pop ecx
call fcn.004f16be
mov esi, eax
call fcn.00512297
add eax, esi
xor edx, edx
mov ecx, 0x1869f
div ecx
mov eax, edi
lea edi, [ebp - 0x1008]
push edx
push str.__d.tmp
call fcn.004c5375
mov ecx, dword [ebp - 0x1410]
push 0x31e
mov edi, str..Archive.c
push edi
mov edx, 0x530488
call fcn.0042d2c6
add esp, 0x10
cmp eax, ebx
mov dword [ebp - 0x1418], eax
jne 0x404204
mov edi, dword [ebp - 0x1410]
call fcn.0042ad00
test eax, eax
je 0x40416d
push edi
push str.:5:UltraCompressArchive___FAILED:_fopen___s____rb___FAILED:_The_given_source_archive_exists_but_cannot_be_opened_for_reading_
call fcn.004265da
pop ecx
pop ecx
jmp 0x40416d
push 0x325
push edi
mov edx, 0x532348
lea ecx, [ebp - 0x1008]
call fcn.0042d2c6
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0x140c], eax
jne 0x40423f
mov ecx, dword [ebp - 0x1418]
call fcn.0042d70e
lea eax, [ebp - 0x1008]
push eax
push str.:8:UltraCompressArchive___FAILED:_fopen___s____wb___FAILED:_The_temp_file_could_not_be_created_
jmp 0x4041f8
mov esi, dword [ebp - 0x1410]
push str..exe
call fcn.004c4471
push eax
call fcn.00512a33
xor edi, edi
pop ecx
inc edi
test eax, eax
pop ecx
jne 0x404361
push str._nLooking_for_self_extraction...
call fcn.00416ae0
pop ecx
mov ecx, esi
call fcn.0040538e
cmp eax, ebx
mov dword [ebp - 0x1430], eax
jle 0x404367
push 0x3ff
lea eax, [ebp - 0x1407]
push ebx
push eax
mov byte [ebp - 0x1408], bl
call fcn.005117f0
add esp, 0xc
cmp dword [ebp - 0x1430], ebx
mov dword [ebp - 0x1414], ebx
jle 0x404367
mov esi, dword [ebp - 0x1418]
mov eax, dword [ebp - 0x1430]
sub eax, dword [ebp - 0x1414]
mov ecx, 0x400
cmp eax, ecx
jbe 0x4042cc
mov eax, ecx
push esi
push eax
lea eax, [ebp - 0x1408]
push edi
push eax
call fcn.00511c63
add esp, 0x10
cmp eax, ebx
mov dword [ebp - 0x1424], eax
jle 0x40431d
push dword [ebp - 0x140c]
push eax
lea eax, [ebp - 0x1408]
push edi
push eax
call fcn.005110f1
add esp, 0x10
cmp eax, dword [ebp - 0x1424]
jb 0x404346
inc dword [ebp - 0x1414]
mov eax, dword [ebp - 0x1414]
cmp eax, dword [ebp - 0x1430]
jl 0x4042b5
jmp 0x40436d
push dword [ebp - 0x1414]
push str.:7:UltraCompressArchive___FAILED:_fread___FAILED_to_read_self_extraction_code:__d
call fcn.004265da
pop ecx
pop ecx
mov ecx, esi
call fcn.0042d70e
mov ecx, dword [ebp - 0x140c]
call fcn.0042d70e
jmp 0x40416d
push dword [ebp - 0x1424]
push dword [ebp - 0x1414]
push str.:7:UltraCompressArchive___FAILED:_fwrite___FAILED_to_write_self_extraction_code:__d___d
call fcn.004265da
add esp, 0xc
jmp 0x40432f
mov dword [ebp - 0x1430], ebx
mov esi, dword [ebp - 0x1418]
push esi
push edi
lea eax, [ebp - 0x1428]
push 4
push eax
call fcn.00511c63
push dword [ebp - 0x140c]
lea eax, [ebp - 0x1428]
push edi
push 4
push eax
call fcn.005110f1
push str._nValidating_CheckSum...
call fcn.00416ae0
add esp, 0x24
push esi
push edi
lea eax, [ebp - 0x143c]
push 4
push eax
call fcn.00511c63
push dword [ebp - 0x140c]
lea eax, [ebp - 0x143c]
push edi
push 4
push eax
call fcn.005110f1
mov ecx, dword [ebp - 0x1428]
push esi
call fcn.00406679
mov dword [ebp - 0x1434], eax
mov eax, dword [ebp - 0x1430]
add esp, 0x24
add eax, 8
push ebx
push eax
push esi
call fcn.005131f0
add esp, 0xc
push esi
push edi
lea eax, [ebp - 0x1450]
push 8
push eax
call fcn.00511c63
push dword [ebp - 0x140c]
lea eax, [ebp - 0x1450]
push edi
push 8
push eax
call fcn.005110f1
add esp, 0x20
mov dword [ebp - 0x1414], str.222PAULAARCHIVE222JesusIAdoreYou
push esi
call fcn.0051344f
pop ecx
push dword [ebp - 0x140c]
mov dword [ebp - 0x1438], eax
push eax
call fcn.00512df5
mov eax, dword [ebp - 0x1414]
movsx eax, byte [eax]
cmp dword [ebp - 0x1438], eax
pop ecx
pop ecx
jne 0x404498
inc dword [ebp - 0x1414]
mov eax, dword [ebp - 0x1414]
cmp byte [eax], bl
jne 0x40441f
mov eax, dword [ebp - 0x1434]
cmp eax, dword [ebp - 0x143c]
je 0x4044e0
push str._nERROR:_CheckSum_failed._The_given_archive_is_corrupt_
call fcn.00416ae0
pop ecx
push dword [ebp - 0x1434]
push dword [ebp - 0x143c]
push dword [ebp - 0x1410]
push str.:4:A_corrupt_archive_file_was_passed_into_UltraCompressArchive___s__:_The_CheckSum_should_be__ld_but_was_calculated_to_be__ld.
call fcn.00426c01
add esp, 0x10
jmp 0x40432f
mov ecx, esi
call fcn.0042d70e
mov ecx, dword [ebp - 0x140c]
call fcn.0042d70e
push str._nERROR:_The_given_archive_is_invalid_or_corrupt_
call fcn.00416ae0
pop ecx
mov ecx, dword [ebp - 0x1410]
push ebx
call fcn.0042b397
test eax, eax
pop ecx
push dword [ebp - 0x1410]
jne 0x4044d6
push str.:4:An_invalid_archive_file_was_passed_into_UltraCompressArchive___s__:_The_file_size_is_zero.
jmp 0x4041f8
push str.:4:An_invalid_archive_file_was_passed_into_UltraCompressArchive___s__:_The_archive_validation_string_could_not_be_found.
jmp 0x4041f8
mov dword [ebp - 0x1424], ebx
mov esi, str._n________ERROR__d________
push dword [ebp - 0x1418]
lea eax, [ebp - 0x142c]
push edi
push 4
push eax
mov dword [ebp - 0x142c], ebx
call fcn.00511c63
add esp, 0x10
cmp eax, edi
jae 0x40454a
push dword [ebp - 0x1418]
call fcn.0051313a
test eax, eax
pop ecx
jne 0x404877
push 0x38c
push esi
call fcn.00416ae0
push str._GetLastError_
push dword [ebp - 0x142c]
push dword [ebp - 0x1410]
push str.:9:UltraCompressArchive___s___FAILED:_fread___FAILED_to_read_the_size_of_the_next_entry:_read__ld:__s
call fcn.004265da
add esp, 0x18
push dword [ebp - 0x140c]
lea eax, [ebp - 0x142c]
push edi
push 4
push eax
call fcn.005110f1
add esp, 0x10
cmp eax, edi
jb 0x4049d8
push dword [ebp - 0x140c]
call fcn.005130cc
cmp eax, 0xffffffff
pop ecx
je 0x4049f3
sub eax, 4
cmp dword [ebp - 0x142c], ebx
mov dword [ebp - 0x1454], eax
jl 0x404a0e
push 0x800
lea eax, [ebp - 0x808]
push ebx
push eax
call fcn.005117f0
add esp, 0xc
mov dword [ebp - 0x1414], ebx
push dword [ebp - 0x1418]
call fcn.0051344f
pop ecx
push dword [ebp - 0x140c]
mov dword [ebp - 0x1438], eax
push eax
call fcn.00512df5
mov eax, dword [ebp - 0x1438]
cmp eax, ebx
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1414]
mov byte [ebp + ecx - 0x808], al
je 0x4045f8
inc dword [ebp - 0x1414]
cmp dword [ebp - 0x1414], 0x800
jb 0x4045af
cmp dword [ebp - 0x1414], 0x800
jae 0x404a2f
push 8
lea eax, [ebp - 0x1450]
push ebx
push eax
call fcn.005117f0
add esp, 0xc
push dword [ebp - 0x1418]
lea eax, [ebp - 0x1450]
push edi
push 8
push eax
call fcn.00511c63
add esp, 0x10
cmp eax, edi
jb 0x404a57
push dword [ebp - 0x140c]
lea eax, [ebp - 0x1450]
push edi
push 8
push eax
call fcn.005110f1
add esp, 0x10
cmp eax, edi
jb 0x404a79
lea eax, [ebp - 0x808]
push eax
push str._nRecompress:___s_
call fcn.00416ae0
inc dword [ebp - 0x1424]
cmp dword [ebp - 0x1420], ebx
pop ecx
pop ecx
jne 0x404696
push edi
push 0xc366
call fcn.00511988
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0x1420], eax
je 0x404a94
cmp dword [ebp - 0x142c], ebx
mov dword [ebp - 0x1448], ebx
mov dword [ebp - 0x1438], ebx
jle 0x404810
push dword [ebp - 0x1418]
lea eax, [ebp - 0x141c]
push edi
push 2
push eax
call fcn.00511c63
add esp, 0x10
cmp eax, edi
jb 0x404aae
cmp word [ebp - 0x141c], bx
je 0x404be1
movzx ecx, word [ebp - 0x141c]
mov dword [ebp - 0x1414], ecx
fild dword [ebp - 0x1414]
fcomp qword [0x5bf890]
fnstsw ax
test ah, 0x41
je 0x404be1
push dword [ebp - 0x1418]
push ecx
push edi
push dword [ebp - 0x1420]
call fcn.00511c63
movzx ecx, word [ebp - 0x141c]
add esp, 0x10
cmp eax, ecx
jb 0x404add
mov eax, dword [ebp - 0x1420]
push dword [ebp - 0x1440]
lea ecx, [eax + 0x56d8]
push ecx
push dword [ebp - 0x141c]
call fcn.00405029
movzx eax, ax
add esp, 0xc
cmp ax, bx
mov dword [ebp - 0x1414], eax
je 0x404b14
mov ebx, dword [ebp - 0x1420]
push edi
push dword [ebp - 0x1440]
push eax
lea eax, [ebx + 0x56d8]
push eax
call fcn.00404c8c
movzx eax, ax
add esp, 0x10
test ax, ax
mov dword [ebp - 0x1444], eax
je 0x404b5a
mov ecx, dword [ebp - 0x1448]
push dword [ebp - 0x140c]
movzx eax, ax
lea eax, [ecx + eax + 2]
push edi
mov dword [ebp - 0x1448], eax
lea eax, [ebp - 0x1444]
push 2
push eax
call fcn.005110f1
add esp, 0x10
cmp eax, edi
jb 0x404b81
push dword [ebp - 0x140c]
movzx eax, word [ebp - 0x1444]
push eax
push edi
push ebx
call fcn.005110f1
movzx ecx, word [ebp - 0x1444]
add esp, 0x10
cmp eax, ecx
jb 0x404bad
push 0x5320c4
call fcn.00416ae0
movzx eax, word [ebp - 0x141c]
pop ecx
mov ecx, dword [ebp - 0x1438]
lea eax, [ecx + eax + 2]
xor ebx, ebx
cmp eax, dword [ebp - 0x142c]
mov dword [ebp - 0x1438], eax
jl 0x4046ae
push ebx
push dword [ebp - 0x1454]
push dword [ebp - 0x140c]
call fcn.005131f0
add esp, 0xc
test eax, eax
jne 0x404c01
push dword [ebp - 0x140c]
lea eax, [ebp - 0x1448]
push edi
push 4
push eax
call fcn.005110f1
add esp, 0x10
cmp eax, edi
jb 0x404c01
push 2
push ebx
push dword [ebp - 0x140c]
call fcn.005131f0
add esp, 0xc
test eax, eax
jne 0x404c01
push dword [ebp - 0x140c]
call fcn.005133f3
pop ecx
jmp 0x4044eb
push dword [ebp - 0x140c]
call fcn.005130cc
pop ecx
mov dword [ebp - 0x1428], eax
mov eax, dword [ebp - 0x1430]
push ebx
add eax, 8
push eax
push dword [ebp - 0x140c]
call fcn.005131f0
add esp, 0xc
test eax, eax
je 0x4048c3
push 0x468
push esi
call fcn.00416ae0
push str.:8:UltraCompressArchive___encountered_a_problem:_ftell___FAILED_to_seek_to_calculate_the_CheckSum_
call fcn.004265da
add esp, 0xc
jmp 0x404c20
push dword [ebp - 0x140c]
mov ecx, dword [ebp - 0x1428]
call fcn.00406679
pop ecx
push dword [ebp - 0x140c]
mov dword [ebp - 0x1434], eax
call fcn.005130cc
cmp eax, 0xffffffff
pop ecx
mov dword [ebp - 0x1428], eax
jne 0x404909
push 0x479
push esi
call fcn.00416ae0
push str.:7:AddFilesToArchiveSub___encountered_a_problem:_ftell___FAILED_to_determine_dwArchiveSize.
call fcn.00426c01
jmp 0x4048bb
push ebx
push dword [ebp - 0x1430]
push dword [ebp - 0x140c]
call fcn.005131f0
add esp, 0xc
push dword [ebp - 0x140c]
lea eax, [ebp - 0x1428]
push edi
push 4
push eax
call fcn.005110f1
add esp, 0x10
cmp eax, edi
jae 0x40495d
push 0x482
push esi
call fcn.00416ae0
push dword [ebp - 0x1428]
push str.:8:AddFilesToArchiveSub___FAILED:_Could_not_write_the_Archive_Size_DWORD__ld_
call fcn.004265da
add esp, 0x10
jmp 0x404c20
push dword [ebp - 0x140c]
lea eax, [ebp - 0x1434]
push edi
push 4
push eax
call fcn.005110f1
add esp, 0x10
cmp eax, edi
jae 0x404991
push 0x488
push esi
call fcn.00416ae0
push dword [ebp - 0x1434]
push str.:8:AddFilesToArchiveSub___FAILED:_Could_not_write_the_CheckSum_DWORD__ld_
jmp 0x404950
mov ecx, dword [ebp - 0x1418]
call fcn.0042d70e
mov ecx, dword [ebp - 0x140c]
call fcn.0042d70e
push edi
push dword [ebp - 0x1410]
lea ecx, [ebp - 0x1008]
call fcn.00429b8e
lea eax, [ebp - 0x1008]
call fcn.0042a76b
push str._nDone_
mov esi, edi
call fcn.00416ae0
add esp, 0xc
jmp 0x404c38
push 0x391
push esi
call fcn.00416ae0
push dword [ebp - 0x1410]
push str.:5:UltraCompressArchive___s___FAILED:_Could_not_write_to_the_destination_file.
jmp 0x404950
push 0x39a
push esi
call fcn.00416ae0
push dword [ebp - 0x1410]
push str.:5:UltraCompressArchive___s___FAILED:_ftell___failed_to_save_the_current_file_size_position.
jmp 0x404950
push 0x3a4
push esi
call fcn.00416ae0
push dword [ebp - 0x142c]
push dword [ebp - 0x1410]
push str.:9:UltraCompressArchive___s___FAILED:_an_entry_size_was_read_to_be__ld_wich_is_invalid_
jmp 0x404c18
push 0x3bb
push esi
mov byte [ebp - 0x78a], bl
call fcn.00416ae0
lea eax, [ebp - 0x808]
push eax
push dword [ebp - 0x1410]
push str.:9:UltraCompressArchive___s___FAILED:_The_following_string_was_read_as_a_file_name_for_one_of_the_entries:___s_
jmp 0x404c18
push 0x3c4
push esi
call fcn.00416ae0
lea eax, [ebp - 0x808]
push eax
push dword [ebp - 0x1410]
push str.:9:UltraCompressArchive___s___FAILED:_fread___FAILED_to_read_the_file_time_stamp_for___s_
jmp 0x404c18
push 0x3ca
push esi
call fcn.00416ae0
push dword [ebp - 0x1410]
push str.:5:UltraCompressArchive___s___FAILED:_The_time_stamp_could_not_be_written_to_the_destination.
jmp 0x404950
push 0x3ec
push esi
call fcn.00416ae0
push 0x56ce
push str.:8:UltraCompressArchive___FAILED:_calloc___failed_to_allocate____ld__2.25f___10__bytes_of_date:_OUT_OF_MEMORY_
jmp 0x404950
push 0x3f9
push esi
call fcn.00416ae0
push str._GetLastError_
lea eax, [ebp - 0x808]
push eax
push dword [ebp - 0x1410]
push str.:9:UltraCompressArchive___s___FAILED:_Unrecoverable_error:_the_next_block_size_for___s__could_not_be_read:_fread___FAILED:__s
call fcn.004265da
add esp, 0x18
jmp 0x404c20
push 0x40b
push esi
call fcn.00416ae0
push str._GetLastError_
lea eax, [ebp - 0x808]
push eax
movzx eax, word [ebp - 0x141c]
push eax
push dword [ebp - 0x1410]
push str.:8:UltraCompressArchive___s___FAILED:_Unrecoverable_error:_the_next_block_to_read_should_be__ld__but_fread___failed_to_read_this_amount_of_data_from_the_file___s_:_fread___FAILED:__s
call fcn.004265da
add esp, 0x1c
jmp 0x404c20
cmp dword [ebp - 0x1440], ebx
jne 0x404b33
push dword [ebp - 0x1410]
push str.:8:UltraCompressArchive___s___FAILED:_ExpandBlock___FAILED_with_no_key.
call fcn.00426c01
pop ecx
pop ecx
jmp 0x404c20
push dword [ebp - 0x1440]
push dword [ebp - 0x1410]
push str.:8:UltraCompressArchive___s___FAILED:_ExpandBlock___FAILED_with_the_following_key:___s_.
call fcn.00426c01
add esp, 0xc
or dword [ebp - 0x1424], 0xffffffff
mov esi, edi
jmp 0x404c22
push 0x42c
push esi
call fcn.00416ae0
push dword [ebp - 0x1410]
push str.:5:UltraCompressArchive___s___FAILED:_A_block_could_not_be_compressed.
call fcn.004265da
add esp, 0x10
xor esi, esi
xor ebx, ebx
jmp 0x404c22
push 0x438
push esi
call fcn.00416ae0
push str._GetLastError_
lea eax, [ebp - 0x808]
push eax
push dword [ebp - 0x1410]
push str.:9:UltraCompressArchive___s___FAILED:_The_new_block_size_for___s__could_not_be_written:_fwrite___FAILED:__s
call fcn.004265da
add esp, 0x18
jmp 0x404b78
push 0x441
push esi
call fcn.00416ae0
push str._GetLastError_
lea eax, [ebp - 0x1008]
push eax
movzx eax, word [ebp - 0x1414]
push eax
push dword [ebp - 0x1410]
push str.:8:UltraCompressArchive___s___FAILED:_failed_to_write_a_block_of_size__ld_to_destination_file___s_:_fwrite___FAILED:__s
call fcn.004265da
add esp, 0x1c
jmp 0x404b78
push 0x402
push esi
call fcn.00416ae0
movzx eax, word [ebp - 0x141c]
push eax
push dword [ebp - 0x1410]
push str.:9:UltraCompressArchive___s___FAILED:_Unrecoverable_error:_the_size_of_the_next_block_of_compressed_data_was_read_to_be__ld_which_is_invalid.
jmp 0x404c18
push 0x451
push esi
call fcn.00416ae0
push ebx
push dword [ebp - 0x1410]
push str.:8:UltraCompressArchive___s___FAILED:_The_next_files_size_field_could_not_be_updated:__d
call fcn.004265da
add esp, 0x14
xor esi, esi
mov ecx, dword [ebp - 0x1418]
call fcn.0042d70e
mov ecx, dword [ebp - 0x140c]
call fcn.0042d70e
cmp dword [ebp - 0x1420], ebx
je 0x404c4c
push dword [ebp - 0x1420]
call fcn.00511758
pop ecx
lea edi, [ebp - 0x1008]
call fcn.0042ad00
test eax, eax
je 0x404c71
mov eax, edi
call fcn.0042a76b
test eax, eax
jne 0x404c71
push str.:4:UltraCompressArchive___encountered_a_problem:_The_temp_file_could_not_be_deleted.
call fcn.004265da
pop ecx
mov eax, esi
neg eax
sbb eax, eax
and eax, dword [ebp - 0x1424]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0051291c
leave
ret