Function at 0x401ba0
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.00406970
cmp eax, 0xffffffff
je 0x401e0a
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.00406bf0
mov ebp, eax
test eax, eax
je 0x401dee
mov eax, dword [ebx]
test eax, eax
je 0x401d50
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.0040dc90
test eax, eax
js 0x401dd0
mov eax, dword [esp + 0x54]
cmp byte [eax + 0x10], 1
je 0x401d10
mov dword [esp], 0x2000
call sub.msvcrt.dll_malloc
mov dword [esp + 0x2c], eax
test eax, eax
je 0x401e14
mov eax, dword [esp + 0x54]
xor edi, edi
mov esi, dword [eax + 0xc]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x401d96
mov dword [esp + 0x24], ebp
mov ebp, ebx
mov ebx, dword [esp + 0x2c]
jmp 0x401c9a
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 0x401da0
sub esi, dword [esp + 0x18]
sbb edi, dword [esp + 0x1c]
mov eax, edi
or eax, esi
je 0x401d90
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 0x401c60
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.00402480
mov edi, 0xffffffff
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call sub.msvcrt.dll_free
jmp 0x401d24
mov dword [esp], 0
mov edx, eax
mov ecx, ebp
mov eax, ebx
call fcn.00401600
mov edi, eax
mov eax, dword [ebx]
test eax, eax
je 0x401d38
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.004036e0
mov dword [ebx], eax
test eax, eax
jne 0x401bed
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.00402430
mov edi, 0xffffffff
jmp 0x401d24
mov ebx, ebp
mov ebp, dword [esp + 0x24]
xor edi, edi
jmp 0x401cfb
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.00402480
jmp 0x401cf6
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.00402480
jmp 0x401d81
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.00402480
mov edi, 0xffffffff
jmp 0x401d40
mov eax, dword [esp + 0x28]
mov dword [esp + 4], str.Failed_to_extract__s:_failed_to_allocate_temporary_buffer__n
mov dword [esp], 0x4180d2
mov dword [esp + 8], eax
call fcn.00402480
jmp 0x401d81