Function at 0x1004019d0
Capabilities:
Terminate process
Write file on windows

Disassembly:
push rbx
sub rsp, 0x20
lea rbx, [0x1004089a0]
call sub.cygwin1.dll___getreent
mov rcx, qword [rax + 0x18]
lea rdx, str._s:_malloc_failed_on_request_for__d_bytes._n
mov r9d, 0x18
mov r8, rbx
call sub.cygwin1.dll_fprintf
call sub.cygwin1.dll___getreent
mov rcx, qword [rax + 0x18]
lea rdx, str._s:_warning:_output_file_s__may_be_incomplete._n
mov r8, rbx
call sub.cygwin1.dll_fprintf
mov ecx, 1
call sub.cygwin1.dll_exit
nop
nop
nop
nop
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x78
mov rbx, rdx
mov esi, ecx
call sub.cygwin1.dll___main
mov rdx, qword [rbx]
lea rax, [0x1004089a0]
mov r8d, 0x7cf
mov rcx, rax
mov qword [rsp + 0x60], rax
call sub.cygwin1.dll_strncpy
lea rax, [0x1004081c0]
mov byte [0x10040916f], 0
mov byte [0x1004cc680], 0
mov byte [0x1004081c0], 0
mov qword [rsp + 0x58], rax
call sub.cygwin1.dll___getreent
mov r9, qword [rax + 0x18]
lea rcx, str.bzip2recover_1.0.8:_extracts_blocks_from_damaged_.bz2_files._n
mov r8d, 0x3d
mov edx, 1
call sub.cygwin1.dll_fwrite
cmp esi, 2
jne 0x1004023e9
mov rsi, qword [rbx + 8]
mov rcx, rsi
call sub.cygwin1.dll_strlen
cmp rax, 0x7bb
mov rbx, rax
ja 0x1004023c2
mov rdi, qword [rsp + 0x58]
lea r8, [rax + 1]
mov r9d, 0x7d0
mov rdx, rsi
mov rcx, rdi
call sub.cygwin1.dll___memcpy_chk
lea rdx, [0x100404171]
mov rcx, rdi
call sub.cygwin1.dll_fopen
test rax, rax
je 0x100402399
mov rcx, rax
xor esi, esi
xor edi, edi
call fcn.100401250
mov rbx, rax
xor r15d, r15d
xor r12d, r12d
call sub.cygwin1.dll___getreent
mov r8, qword [rsp + 0x60]
mov rcx, qword [rax + 0x18]
lea rdx, str._s:_searching_for_block_boundaries_..._n
lea r13, [0x100409180]
xor ebp, ebp
lea r14, [0x10046ac00]
call sub.cygwin1.dll_fprintf
lea rax, [0x10052e8e0]
mov qword [0x100409180], 0
mov dword [rsp + 0x54], 0
mov qword [rsp + 0x30], rax
lea rax, [0x1004cce60]
mov qword [rsp + 0x38], rax
jmp 0x100401b72
cmp eax, 0x1772
jne 0x100401b6f
cmp esi, 0x45385090
je 0x100401ba9
mov r15, r10
mov rcx, rbx
call fcn.100401170
cmp eax, 2
lea r10, [r15 + 1]
je 0x100401c60
mov edx, esi
add edi, edi
and eax, 1
shr edx, 0x1f
add esi, esi
or edi, edx
or esi, eax
movzx eax, di
cmp eax, 0x3141
jne 0x100401b60
cmp esi, 0x59265359
jne 0x100401b6f
lea rax, [r15 - 0x30]
cmp r10, 0x31
mov edx, 0
cmovbe rax, rdx
test r12d, r12d
mov qword [r14 + rbp*8], rax
je 0x100401c4f
mov r9, qword [r13 + rbp*8]
mov rdx, rax
sub rax, r9
cmp rax, 0x81
jbe 0x100401c42
mov eax, dword [rsp + 0x54]
mov qword [rsp + 0x68], r10
mov qword [rsp + 0x48], r9
mov qword [rsp + 0x40], rdx
lea r15d, [rax + 1]
call sub.cygwin1.dll___getreent
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rax + 0x18]
mov r8d, r15d
mov r9, qword [rsp + 0x48]
mov qword [rsp + 0x20], rdx
lea rdx, str.___block__d_runs_from__Lu_to__Lu_n
call sub.cygwin1.dll_fprintf
movsxd rax, dword [rsp + 0x54]
mov rdx, qword [r13 + rbp*8]
mov rcx, qword [rsp + 0x30]
mov r10, qword [rsp + 0x68]
mov dword [rsp + 0x54], r15d
mov qword [rcx + rax*8], rdx
mov rdx, qword [r14 + rbp*8]
mov rcx, qword [rsp + 0x38]
mov qword [rcx + rax*8], rdx
cmp r12d, 0xc34f
jg 0x1004022bf
add r12d, 1
movsxd rbp, r12d
mov qword [r13 + rbp*8], r10
jmp 0x100401b6f
mov r13, qword [r13 + rbp*8]
cmp r13, r10
ja 0x100401c77
sub r10, r13
cmp r10, 0x27
ja 0x10040225b
mov rcx, rbx
call fcn.1004010e0
mov eax, dword [rsp + 0x54]
test eax, eax
je 0x100402375
call sub.cygwin1.dll___getreent
mov r8, qword [rsp + 0x60]
mov rcx, qword [rax + 0x18]
lea rdx, str._s:_splitting_into_blocks_n
call sub.cygwin1.dll_fprintf
mov rcx, qword [rsp + 0x58]
lea rdx, [0x100404171]
call sub.cygwin1.dll_fopen
test rax, rax
je 0x10040234c
mov rcx, rax
xor ebp, ebp
xor r12d, r12d
call fcn.100401250
mov qword [rsp + 0x40], rax
lea rax, [0x10052e8e0]
xor r14d, r14d
xor ebx, ebx
xor r15d, r15d
mov qword [rsp + 0x30], rax
lea rax, [0x1004cce60]
mov qword [rsp + 0x38], rax
lea rax, [0x1004cc680]
mov qword [rsp + 0x48], rax
jmp 0x100401d2b
cmp r12, rcx
jbe 0x10040220c
lea r12, [rcx + 1]
cmp r12, r13
je 0x100402204
mov rax, qword [rsp + 0x30]
mov r8, qword [rax + r9*8]
cmp r13, r8
je 0x100401f13
mov r12, r13
mov rcx, qword [rsp + 0x40]
call fcn.100401170
cmp eax, 2
je 0x10040222e
mov rcx, qword [rsp + 0x30]
mov edx, esi
movsxd r9, r14d
shr edx, 0x1f
add edi, edi
add esi, esi
or edi, edx
mov edx, eax
mov r8, qword [rcx + r9*8]
and edx, 1
or esi, edx
lea rdx, [r8 + 0x2f]
cmp r12, rdx
jne 0x100401d71
mov ebp, edi
mov edx, esi
shl ebp, 0x10
shr edx, 0x10
or ebp, edx
mov rcx, qword [rsp + 0x38]
test r15, r15
lea r13, [r12 + 1]
mov rcx, qword [rcx + r9*8]
je 0x100401f01
cmp r12, r8
jae 0x100401d00
lea r12, [rcx + 1]
cmp r13, r12
jne 0x100401d1f
mov r15d, 7
mov r13d, 0x17
nop word cs:[rax + rax]
mov ecx, r15d
mov edx, r13d
sub r15d, 1
shr edx, cl
mov rcx, rbx
and edx, 1
call fcn.1004011e0
cmp r15d, 0xffffffff
jne 0x100401db0
mov r15d, 7
mov r13d, 0x72
nop dword [rax]
mov ecx, r15d
mov edx, r13d
sub r15d, 1
shr edx, cl
mov rcx, rbx
and edx, 1
call fcn.1004011e0
cmp r15d, 0xffffffff
jne 0x100401de0
mov r15d, 7
mov r13d, 0x45
nop dword [rax]
mov ecx, r15d
mov edx, r13d
sub r15d, 1
shr edx, cl
mov rcx, rbx
and edx, 1
call fcn.1004011e0
cmp r15d, 0xffffffff
jne 0x100401e10
mov r15d, 7
mov r13d, 0x38
nop dword [rax]
mov ecx, r15d
mov edx, r13d
sub r15d, 1
shr edx, cl
mov rcx, rbx
and edx, 1
call fcn.1004011e0
cmp r15d, 0xffffffff
jne 0x100401e40
mov r15d, 7
mov r13d, 0x50
nop dword [rax]
mov ecx, r15d
mov edx, r13d
sub r15d, 1
shr edx, cl
mov rcx, rbx
and edx, 1
call fcn.1004011e0
cmp r15d, 0xffffffff
jne 0x100401e70
mov r15d, 7
mov r13d, 0x90
nop dword [rax]
mov ecx, r15d
mov edx, r13d
sub r15d, 1
shr edx, cl
mov rcx, rbx
and edx, 1
call fcn.1004011e0
cmp r15d, 0xffffffff
jne 0x100401ea0
mov r13d, 0x1f
mov ecx, r13d
mov edx, ebp
sub r13d, 1
shr edx, cl
mov rcx, rbx
and edx, 1
call fcn.1004011e0
cmp r13d, 0xffffffff
jne 0x100401ec3
mov rcx, rbx
mov r13, r12
call fcn.1004010e0
cmp dword [rsp + 0x54], r14d
jle 0x10040222e
add r14d, 1
xor r15d, r15d
jmp 0x100401d28
lea r12, [rcx + 1]
cmp r13, r12
je 0x100401eea
cmp r13, r8
jne 0x100401d28
mov rax, qword [rsp + 0x48]
lea rdx, [0x1004cce50]
nop
mov byte [rax], 0
add rax, 1
cmp rdx, rax
jne 0x100401f20
mov rbx, qword [rsp + 0x48]
mov rdx, qword [rsp + 0x58]
mov r8d, 0x7d0
lea r12d, [r14 + 1]
mov rcx, rbx
call sub.cygwin1.dll___strcpy_chk
mov rcx, rbx
mov edx, 0x2f
call sub.cygwin1.dll_strrchr
lea r15, [rax + 1]
test rax, rax
lea rdx, str.rec_5d
mov rax, rbx
mov r8d, r12d
cmove r15, rbx
mov rbx, r15
mov rcx, r15
sub rbx, rax
call sub.cygwin1.dll_sprintf
movzx eax, byte [r15]
test al, al
je 0x100401f97
cmp al, 0x20
jne 0x100401f8b
mov byte [r15], 0x30
add r15, 1
movzx eax, byte [r15]
test al, al
jne 0x100401f83
mov rcx, qword [rsp + 0x48]
mov edx, dword [rcx]
add rcx, 4
lea eax, [rdx - 0x1010101]
not edx
and eax, edx
and eax, 0x80808080
je 0x100401f9c
mov edx, eax
mov r8d, 0x7d0
shr edx, 0x10
test eax, 0x8080
cmove eax, edx
lea rdx, [rcx + 2]
cmove rcx, rdx
mov edx, eax
add dl, al
movsxd rdx, ebx
sbb rcx, 3
add rdx, qword [rsp + 0x58]
call sub.cygwin1.dll___stpcpy_chk
mov rbx, qword [rsp + 0x48]
mov rdx, rax
sub rdx, rbx
cmp edx, 4
jle 0x100402001
movsxd rdx, edx
cmp byte [rbx + rdx - 4], 0x2e
je 0x100402294
mov dword [rax], 0x327a622e
mov byte [rax + 4], 0
call sub.cygwin1.dll___getreent
mov rbx, qword [rsp + 0x48]
mov rcx, qword [rax + 0x18]
lea rdx, str.___writing_block__d_to___s_..._n
mov r8d, r12d
mov r9, rbx
call sub.cygwin1.dll_fprintf
lea rdx, [0x100404349]
mov rcx, rbx
call sub.cygwin1.dll_fopen
test rax, rax
mov r15, rax
je 0x100402323
mov ecx, 0x18
call sub.cygwin1.dll_malloc
test rax, rax
mov rbx, rax
je 0x1004022ba
mov qword [rax], r15
mov qword [rax + 8], 0
mov r12d, 7
mov byte [rax + 0x10], 0x77
mov ecx, r12d
mov edx, 0x42
sub r12d, 1
shr edx, cl
mov rcx, rbx
and edx, 1
call fcn.1004011e0
cmp r12d, 0xffffffff
jne 0x100402071
mov r12d, 7
nop word cs:[rax + rax]
mov ecx, r12d
mov edx, 0x5a
sub r12d, 1
shr edx, cl
mov rcx, rbx
and edx, 1
call fcn.1004011e0
cmp r12d, 0xffffffff
jne 0x1004020a0
mov r12d, 7
mov ecx, r12d
mov edx, 0x68
sub r12d, 1
shr edx, cl
mov rcx, rbx
and edx, 1
call fcn.1004011e0
cmp r12d, 0xffffffff
jne 0x1004020c5
mov r12d, 7
nop word [rax + rax]
mov ecx, r12d
mov edx, 0x39
sub r12d, 1
shr edx, cl
mov rcx, rbx
and edx, 1
call fcn.1004011e0
cmp r12d, 0xffffffff
jne 0x1004020f0
mov r12d, 7
mov ecx, r12d
mov edx, 0x31
sub r12d, 1
shr edx, cl
mov rcx, rbx
and edx, 1
call fcn.1004011e0
cmp r12d, 0xffffffff
jne 0x100402115
mov r12d, 7
nop word [rax + rax]
mov ecx, r12d
mov edx, 0x41
sub r12d, 1
shr edx, cl
mov rcx, rbx
and edx, 1
call fcn.1004011e0
cmp r12d, 0xffffffff
jne 0x100402140
mov r12d, 7
mov ecx, r12d
mov edx, 0x59
sub r12d, 1
shr edx, cl
mov rcx, rbx
and edx, 1
call fcn.1004011e0
cmp r12d, 0xffffffff
jne 0x100402165
mov r12d, 7
nop word [rax + rax]
mov ecx, r12d
mov edx, 0x26
sub r12d, 1
shr edx, cl
mov rcx, rbx
and edx, 1
call fcn.1004011e0
cmp r12d, 0xffffffff
jne 0x100402190
mov r12d, 7
mov ecx, r12d
mov edx, 0x53
sub r12d, 1
shr edx, cl
mov rcx, rbx
and edx, 1
call fcn.1004011e0
cmp r12d, 0xffffffff
jne 0x1004021b5
mov r12d, 7
nop word [rax + rax]
mov ecx, r12d
mov edx, 0x59
sub r12d, 1
shr edx, cl
mov rcx, rbx
and edx, 1
call fcn.1004011e0
cmp r12d, 0xffffffff
jne 0x1004021e0
jmp 0x100401d28
mov r12, r13
jmp 0x100401d9a
mov edx, eax
mov rcx, rbx
mov qword [rsp + 0x68], r9
call fcn.1004011e0
mov rax, qword [rsp + 0x38]
mov r9, qword [rsp + 0x68]
mov rcx, qword [rax + r9*8]
jmp 0x100401d09
call sub.cygwin1.dll___getreent
mov r8, qword [rsp + 0x60]
mov rcx, qword [rax + 0x18]
lea rdx, str._s:_finished_n
call sub.cygwin1.dll_fprintf
xor eax, eax
add rsp, 0x78
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rax, [0x10046ac00]
test r12d, r12d
mov qword [rax + rbp*8], r15
je 0x100401c77
call sub.cygwin1.dll___getreent
mov rcx, qword [rax + 0x18]
lea rdx, str.___block__d_runs_from__Lu_to__Lu__incomplete__n
mov qword [rsp + 0x20], r15
mov r9, r13
mov r8d, r12d
call sub.cygwin1.dll_fprintf
jmp 0x100401c77
cmp byte [rbx + rdx - 3], 0x62
jne 0x100402001
cmp byte [rbx + rdx - 2], 0x7a
jne 0x100402001
cmp byte [rbx + rdx - 1], 0x32
jne 0x100402001
jmp 0x10040200b
call fcn.1004019d0
call sub.cygwin1.dll___getreent
mov rdi, qword [rsp + 0x60]
mov r9, qword [rsp + 0x58]
lea rdx, str._s:___s_appears_to_contain_more_than__d_blocks_n
mov rcx, qword [rax + 0x18]
mov dword [rsp + 0x20], 0xc350
mov r8, rdi
call sub.cygwin1.dll_fprintf
call sub.cygwin1.dll___getreent
mov rcx, qword [rax + 0x18]
lea rdx, str._s:_and_cannot_be_handled.__To_fix__increase_n
mov r8, rdi
call sub.cygwin1.dll_fprintf
call sub.cygwin1.dll___getreent
mov rcx, qword [rax + 0x18]
lea rdx, str._s:_BZ_MAX_HANDLED_BLOCKS_in_bzip2recover.c__and_recompile._n
mov r8, rdi
call sub.cygwin1.dll_fprintf
mov ecx, 1
call sub.cygwin1.dll_exit
call sub.cygwin1.dll___getreent
mov r9, qword [rsp + 0x48]
mov rcx, qword [rax + 0x18]
lea rdx, str._s:_cant_write___s_n
mov r8, qword [rsp + 0x60]
call sub.cygwin1.dll_fprintf
mov ecx, 1
call sub.cygwin1.dll_exit
call sub.cygwin1.dll___getreent
mov r9, qword [rsp + 0x58]
mov rcx, qword [rax + 0x18]
lea rdx, str._s:_cant_open___s_n
mov r8, qword [rsp + 0x60]
call sub.cygwin1.dll_fprintf
mov ecx, 1
call sub.cygwin1.dll_exit
call sub.cygwin1.dll___getreent
mov r8, qword [rsp + 0x60]
mov rcx, qword [rax + 0x18]
lea rdx, str._s:_sorry__I_couldnt_find_any_block_boundaries._n
call sub.cygwin1.dll_fprintf
mov ecx, 1
call sub.cygwin1.dll_exit
call sub.cygwin1.dll___getreent
mov r9, qword [rsp + 0x58]
mov rcx, qword [rax + 0x18]
lea rdx, str._s:_cant_read___s_n
mov r8, qword [rsp + 0x60]
call sub.cygwin1.dll_fprintf
mov ecx, 1
call sub.cygwin1.dll_exit
call sub.cygwin1.dll___getreent
mov r8, qword [rsp + 0x60]
mov rcx, qword [rax + 0x18]
lea rdx, str._s:_supplied_filename_is_suspiciously_____d_chars__long.__Bye__n
mov r9d, ebx
call sub.cygwin1.dll_fprintf
mov ecx, 1
call sub.cygwin1.dll_exit
call sub.cygwin1.dll___getreent
mov r8, qword [rsp + 0x60]
mov rcx, qword [rax + 0x18]
lea rdx, str._s:_usage_is___s_damaged_file_name._n
mov r9, r8
call sub.cygwin1.dll_fprintf
call sub.cygwin1.dll___getreent
mov r9, qword [rax + 0x18]
lea rcx, str._trestrictions_on_size_of_recovered_file:_None_n
mov r8d, 0x2e
mov edx, 1
call sub.cygwin1.dll_fwrite
mov ecx, 1
call sub.cygwin1.dll_exit
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
push rbp
mov rbp, rsp
pop rbp
jmp fcn.100401050