Function at 0x402b10
Capabilities:
Delete file

Disassembly:
sub esp, 0x24
mov byte [0x412580], 0
push ebx
push ebp
push esi
mov esi, dword [esp + 0x34]
test esi, esi
push edi
jne 0x402b3c
cmp dword [0x412588], 1
je 0x402b3c
push str.uncompress:_bad_modes_n
call fcn.00402850
add esp, 4
mov eax, dword [0x412588]
xor bl, bl
dec eax
je 0x402bc5
dec eax
je 0x402bb3
dec eax
jne 0x402be6
push esi
push 0x413200
call fcn.00401ca0
push esi
push 0x4129c0
call fcn.00401ca0
add esp, 0x10
xor esi, esi
mov eax, dword [esi + 0x40f020]
mov ecx, dword [esi + 0x40f010]
push eax
push ecx
push 0x4129c0
call fcn.00403600
add esp, 0xc
test al, al
jne 0x402be6
add esi, 4
cmp esi, 0x10
jl 0x402b6b
mov edi, 0x4129c0
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [str..out]
repne scasb al, byte es:[edi]
mov al, byte [0x410228]
dec edi
mov bl, 1
mov dword [edi], edx
mov byte [edi + 4], al
jmp 0x402be6
push esi
push 0x413200
call fcn.00401ca0
push str._stdout_
jmp 0x402bd9
push 0x410210
push 0x413200
call fcn.00401ca0
push 0x410218
push 0x4129c0
call fcn.00401ca0
add esp, 0x10
mov eax, dword [0x412588]
mov esi, 1
cmp eax, esi
je 0x402ca2
push 0x413200
call fcn.00402a80
add esp, 4
test al, al
je 0x402c47
mov al, byte [0x4131eb]
test al, al
je 0x402c36
mov ecx, dword [0x41360c]
mov edx, dword [sym.imp.MSVCRT.dll__iob]
push 0x413200
push ecx
add edx, 0x40
push 0x410238
push edx
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0x10
push esi
call fcn.00401a00
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
cmp dword [0x412588], esi
je 0x402ca2
push 0x413200
call fcn.004029a0
add esp, 4
test al, al
jne 0x402ca2
call dword [sym.imp.MSVCRT.dll__errno]
mov eax, dword [eax]
push eax
call dword [sym.imp.MSVCRT.dll_strerror]
mov ecx, dword [0x41360c]
mov edx, dword [sym.imp.MSVCRT.dll__iob]
push eax
push 0x413200
push ecx
add edx, 0x40
push 0x410260
push edx
call dword [sym.imp.MSVCRT.dll_fprintf]
push esi
call fcn.00401a00
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov eax, dword [0x412588]
mov edi, 3
cmp eax, edi
je 0x402cb5
cmp eax, 2
jne 0x402d03
lea eax, [esp + 0x10]
push eax
push 0x413200
call dword [sym.imp.MSVCRT.dll__stat]
mov eax, dword [esp + 0x1e]
add esp, 8
test ah, 0x40
je 0x402d03
mov ecx, dword [0x41360c]
mov edx, dword [sym.imp.MSVCRT.dll__iob]
push 0x413200
push ecx
add edx, 0x40
push 0x410284
push edx
call dword [sym.imp.MSVCRT.dll_fprintf]
push esi
call fcn.00401a00
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
cmp dword [0x412588], edi
jne 0x402d51
mov al, byte [0x41361c]
test al, al
jne 0x402d51
push 0x413200
call fcn.004029f0
add esp, 4
test al, al
je 0x402d51
mov al, byte [0x4131eb]
test al, al
je 0x402c36
mov eax, dword [0x41360c]
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
push 0x413200
push eax
add ecx, 0x40
push str._s:_Input_file__s_is_not_a_normal_file._n
push ecx
jmp 0x402c2d
mov ebp, dword [sym.imp.MSVCRT.dll_fprintf]
test bl, bl
je 0x402d88
mov al, byte [0x4131eb]
test al, al
je 0x402d88
mov edx, dword [0x41360c]
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push 0x4129c0
push 0x413200
push edx
add eax, 0x40
push str._s:_Cant_guess_original_name_for__s____using__s_n
push eax
call ebp
add esp, 0x14
cmp dword [0x412588], edi
jne 0x402e5d
push 0x4129c0
call fcn.004029a0
add esp, 4
test al, al
je 0x402dbc
mov al, byte [0x41361c]
push 0x4129c0
test al, al
je 0x402e1f
call dword [sym.imp.MSVCRT.dll_remove]
add esp, 4
cmp dword [0x412588], edi
jne 0x402e5d
mov al, byte [0x41361c]
test al, al
jne 0x402e50
push 0x413200
call fcn.00402a20
add esp, 4
test eax, eax
jle 0x402e48
cmp eax, esi
mov ecx, 0x41032c
jg 0x402df0
mov ecx, 0x412560
push ecx
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
push eax
mov eax, dword [0x41360c]
push 0x413200
push eax
add ecx, 0x40
push str._s:_Input_file__s_has__d_other_link_s._n
push ecx
call ebp
push esi
call fcn.00401a00
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov ecx, dword [0x41360c]
mov edx, dword [sym.imp.MSVCRT.dll__iob]
push ecx
add edx, 0x40
push str._s:_Output_file__s_already_exists._n
push edx
call ebp
push esi
call fcn.00401a00
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
cmp dword [0x412588], edi
jne 0x402e5d
push 0x413200
call fcn.00402a50
add esp, 4
mov eax, dword [0x412588]
dec eax
je 0x403066
dec eax
je 0x403001
dec eax
je 0x402f3b
push str.uncompress:_bad_srcMode
call fcn.00402850
mov edi, dword [esp + 0x3c]
mov esi, dword [esp + 0x3c]
add esp, 4
cmp dword [0x413610], 1
jl 0x402ec7
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push 0x413200
add eax, 0x40
push 0x410444
push eax
call ebp
push 0x413200
call fcn.00402930
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
add ecx, 0x40
push ecx
call dword [sym.imp.MSVCRT.dll_fflush]
add esp, 0x14
push esi
push edi
mov dword [0x412590], esi
mov byte [0x412580], 1
call fcn.00403180
mov bl, al
add esp, 8
test bl, bl
mov dword [0x412590], 0
je 0x4030c9
cmp dword [0x412588], 3
jne 0x4030f8
push 0x4129c0
call fcn.00402a60
mov al, byte [0x41258d]
add esp, 4
test al, al
mov byte [0x412580], 0
jne 0x4030f8
push 0x413200
call dword [sym.imp.MSVCRT.dll_remove]
add esp, 4
test eax, eax
je 0x4030f8
jmp 0x4030f3
push 0x4103d8
push 0x413200
call dword [sym.imp.MSVCRT.dll_fopen]
push 0x4103dc
push 0x4129c0
mov edi, eax
call fcn.004029d0
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x402fb4
call dword [sym.imp.MSVCRT.dll__errno]
mov edx, dword [eax]
push edx
call dword [sym.imp.MSVCRT.dll_strerror]
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
push eax
mov eax, dword [0x41360c]
push 0x4129c0
push eax
add ecx, 0x40
push str._s:_Cant_create_output_file__s:__s._n
push ecx
call ebp
add esp, 0x18
test edi, edi
je 0x402fa2
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
push 1
call fcn.00401a00
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
test edi, edi
jne 0x402e8c
call dword [sym.imp.MSVCRT.dll__errno]
mov edx, dword [eax]
push edx
call dword [sym.imp.MSVCRT.dll_strerror]
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
push eax
mov eax, dword [0x41360c]
push 0x413200
push eax
add ecx, 0x40
push str._s:_Cant_open_input_file__s:__s._n
push ecx
call ebp
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
push 1
call fcn.00401a00
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
push 0x4103b0
push 0x413200
call dword [sym.imp.MSVCRT.dll_fopen]
mov edx, dword [sym.imp.MSVCRT.dll__iob]
mov edi, eax
add esp, 8
test edi, edi
lea esi, [edx + 0x20]
jne 0x402e8c
call dword [sym.imp.MSVCRT.dll__errno]
mov eax, dword [eax]
push eax
call dword [sym.imp.MSVCRT.dll_strerror]
mov ecx, dword [0x41360c]
mov edx, dword [sym.imp.MSVCRT.dll__iob]
push eax
push 0x413200
push ecx
add edx, 0x40
push 0x4103b4
push edx
call ebp
push 1
call fcn.00401a00
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov edi, dword [sym.imp.MSVCRT.dll__iob]
push edi
lea esi, [edi + 0x20]
call dword [sym.imp.MSVCRT.dll__fileno]
push eax
call dword [sym.imp.MSVCRT.dll__isatty]
add esp, 8
test eax, eax
je 0x402e8c
mov eax, dword [0x41360c]
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
push eax
add ecx, 0x40
push 0x410358
push ecx
call ebp
mov eax, dword [0x41360c]
mov edx, dword [sym.imp.MSVCRT.dll__iob]
push eax
push eax
add edx, 0x40
push 0x41038c
push edx
call ebp
push 1
call fcn.00401a00
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov eax, dword [0x412588]
mov byte [0x412594], 1
cmp eax, 3
mov byte [0x412580], 0
jne 0x4030f8
push 0x4129c0
call dword [sym.imp.MSVCRT.dll_remove]
add esp, 4
test eax, eax
je 0x4030f8
call fcn.00402890
test bl, bl
mov byte [0x412580], 0
je 0x403128
cmp dword [0x413610], 1
jl 0x403177
mov edx, dword [sym.imp.MSVCRT.dll__iob]
push str.done_n
add edx, 0x40
push edx
call ebp
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
push 2
call fcn.00401a00
mov eax, dword [0x413610]
add esp, 4
cmp eax, 1
jl 0x403157
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push str.not_a_bzip2_file._n
add eax, 0x40
push eax
call ebp
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov ecx, dword [0x41360c]
mov edx, dword [sym.imp.MSVCRT.dll__iob]
push 0x413200
push ecx
add edx, 0x40
push str._s:__s_is_not_a_bzip2_file._n
push edx
call ebp
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret