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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebx, dword [esp + 0x50]
mov dword [esp], ebx
call fcn.004068c0
cmp eax, 0xffffffff
je 0x401d2a
mov eax, dword [esp + 0x54]
add eax, 0x12
mov dword [esp + 0x28], eax
mov dword [esp + 4], eax
lea eax, [ebx + 0x3070]
mov dword [esp], eax
call fcn.00406b40
mov ebp, eax
test eax, eax
je 0x401d0e
mov eax, dword [ebx]
test eax, eax
je 0x401c70
mov edi, dword [esp + 0x54]
mov dword [esp + 8], 0
mov edx, dword [edi + 4]
add edx, dword [ebx + 8]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.0040dbe0
test eax, eax
js 0x401cf0
mov eax, dword [esp + 0x54]
cmp byte [eax + 0x10], 1
je 0x401c30
mov dword [esp], 0x2000
call sub.msvcrt.dll_malloc
mov dword [esp + 0x2c], eax
test eax, eax
je 0x401d34
mov eax, dword [esp + 0x54]
xor edi, edi
mov esi, dword [eax + 0xc]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x401cb6
mov dword [esp + 0x24], ebp
mov ebp, ebx
mov ebx, dword [esp + 0x2c]
jmp 0x401bba
mov eax, dword [esp + 0x24]
mov dword [esp + 8], 1
mov dword [esp], ebx
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 4], eax
call sub.msvcrt.dll_fwrite
test eax, eax
je 0x401cc0
sub esi, dword [esp + 0x18]
sbb edi, dword [esp + 0x1c]
mov eax, edi
or eax, esi
je 0x401cb0
xor eax, eax
mov edx, 0x2000
cmp edx, esi
mov ecx, eax
sbb ecx, edi
cmovae eax, edi
cmovae edx, esi
mov dword [esp + 0x1c], eax
mov eax, dword [ebp]
mov dword [esp + 8], 1
mov dword [esp + 0xc], eax
mov dword [esp + 4], edx
mov dword [esp], ebx
mov dword [esp + 0x18], edx
call sub.msvcrt.dll_fread
test eax, eax
jne 0x401b80
mov eax, dword [esp + 0x28]
mov dword [esp + 4], str.Failed_to_extract__s:_failed_to_read_data_chunk__n
mov ebx, ebp
mov dword [esp], str.fread
mov ebp, dword [esp + 0x24]
mov dword [esp + 8], eax
call fcn.004023a0
mov edi, 0xffffffff
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call sub.msvcrt.dll_free
jmp 0x401c44
mov dword [esp], 0
mov edx, eax
mov ecx, ebp
mov eax, ebx
call fcn.00401520
mov edi, eax
mov eax, dword [ebx]
test eax, eax
je 0x401c58
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov dword [ebx], 0
mov dword [esp], ebp
call sub.msvcrt.dll_fclose
add esp, 0x3c
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebx + 0x70]
mov dword [esp + 4], 0x418184
mov dword [esp], eax
call fcn.00403610
mov dword [ebx], eax
test eax, eax
jne 0x401b0d
mov eax, dword [esp + 0x28]
mov dword [esp], str.Failed_to_extract__s:_failed_to_open_archive_file__n
mov dword [esp + 4], eax
call fcn.00402350
mov edi, 0xffffffff
jmp 0x401c44
mov ebx, ebp
mov ebp, dword [esp + 0x24]
xor edi, edi
jmp 0x401c1b
mov eax, dword [esp + 0x28]
mov dword [esp + 4], str.Failed_to_extract__s:_failed_to_write_data_chunk__n
mov ebx, ebp
mov dword [esp], str.fwrite
mov ebp, dword [esp + 0x24]
mov dword [esp + 8], eax
call fcn.004023a0
jmp 0x401c16
mov eax, dword [esp + 0x28]
mov dword [esp + 4], str.Failed_to_extract__s:_failed_to_seek_to_the_entrys_data__n
mov dword [esp], str.fseek
mov dword [esp + 8], eax
call fcn.004023a0
jmp 0x401ca1
mov eax, dword [esp + 0x28]
mov dword [esp + 4], str.Failed_to_extract__s:_failed_to_open_target_file__n
mov dword [esp], str.fopen
mov dword [esp + 8], eax
call fcn.004023a0
mov edi, 0xffffffff
jmp 0x401c60
mov eax, dword [esp + 0x28]
mov dword [esp + 4], str.Failed_to_extract__s:_failed_to_allocate_temporary_buffer__n
mov dword [esp], str.malloc
mov dword [esp + 8], eax
call fcn.004023a0
jmp 0x401ca1