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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x8c
lea ebp, [esp + 0x48]
mov dword [esp + 8], 0x38
mov dword [esp + 4], 0x41a044
mov dword [esp], ebp
mov dword [esp + 0x30], eax
mov dword [esp + 0x24], edx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x48], 0
call fcn.0040b210
mov ebx, eax
test eax, eax
jne 0x4018bb
mov dword [esp], 0x2000
call sub.msvcrt.dll_malloc
mov esi, eax
test eax, eax
je 0x4018e0
mov dword [esp], 0x2000
call sub.msvcrt.dll_malloc
mov edi, eax
mov eax, dword [esp + 0x24]
test edi, edi
je 0x401906
mov eax, dword [eax + 8]
xor edx, edx
mov dword [esp + 0x20], esi
mov dword [esp + 0x2c], edx
mov dword [esp + 0x28], eax
mov ecx, dword [esp + 0x28]
mov ebx, dword [esp + 0x2c]
xor eax, eax
mov edx, 0x2000
mov esi, eax
mov dword [esp + 4], 1
cmp edx, ecx
sbb esi, ebx
mov esi, dword [esp + 0x30]
cmovae edx, ecx
cmovae eax, ebx
mov dword [esp + 0xc], esi
mov dword [esp + 0x18], edx
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 8], ecx
mov dword [esp], eax
mov dword [esp + 0x34], ecx
call sub.msvcrt.dll_fread
mov edx, dword [esp + 0x34]
mov ebx, eax
cmp eax, edx
jne 0x4018a8
mov dword [esp], esi
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x4018a8
mov esi, dword [esp + 0x20]
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x34], eax
mov dword [esp + 0x48], esi
mov dword [esp + 4], 0
mov dword [esp], ebp
mov dword [esp + 0x58], 0x2000
mov dword [esp + 0x54], edi
call fcn.0040b2e0
mov ebx, eax
cmp eax, 0xffffffff
jge 0x401800
cmp eax, 0xfffffffc
jge 0x401858
mov ecx, dword [esp + 0x58]
mov eax, dword [esp + 0x38]
mov edx, 0x2000
sub edx, ecx
test eax, eax
je 0x401860
mov dword [esp + 8], edx
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], edi
mov dword [esp + 0x20], edx
call sub.msvcrt.dll_fwrite
mov edx, dword [esp + 0x20]
cmp eax, edx
jne 0x4018b1
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x4018b1
mov ecx, dword [esp + 0x58]
test ecx, ecx
je 0x40171e
mov dword [esp + 0x3c], ebx
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x20], esi
mov esi, dword [esp + 0x1c]
sub dword [esp + 0x28], ebx
mov eax, dword [esp + 0x34]
sbb dword [esp + 0x2c], esi
cmp dword [esp + 0x3c], 1
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
je 0x401928
mov esi, edx
or esi, ecx
jne 0x4016a5
mov ecx, dword [esp + 0x3c]
mov esi, dword [esp + 0x20]
mov ebx, eax
cmp ecx, 1
je 0x40182e
jmp 0x40180e
cmp eax, 2
jne 0x40174e
mov ecx, 0xfffffffd
mov eax, dword [esp + 0x24]
mov dword [esp + 8], ecx
mov dword [esp], str.Failed_to_extract__s:_decompression_resulted_in_return_code__d__n
add eax, 0x12
mov dword [esp + 4], eax
call fcn.00402fa0
mov ebx, 0xffffffff
mov dword [esp], ebp
call fcn.0040d4e0
mov dword [esp], esi
call sub.msvcrt.dll_free
mov dword [esp], edi
call sub.msvcrt.dll_free
add esp, 0x8c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, eax
jmp 0x40180e
mov eax, dword [esp + 0xa0]
test eax, eax
je 0x4017a5
mov eax, dword [esp + 0xa0]
mov dword [esp + 8], edx
mov dword [esp + 4], edi
mov dword [esp], eax
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x20], edx
call sub.msvcrt.dll_memcpy
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x3c]
add dword [esp + 0xa0], edx
jmp 0x4017a5
mov esi, dword [esp + 0x20]
jmp 0x401829
mov ecx, 0xffffffff
jmp 0x40180e
mov dword [esp + 8], eax
mov eax, dword [esp + 0x24]
mov ebx, 0xffffffff
mov dword [esp], str.Failed_to_extract__s:_inflateInit___failed_with_return_code__d__n
add eax, 0x12
mov dword [esp + 4], eax
call fcn.00402fa0
jmp 0x401846
mov eax, dword [esp + 0x24]
mov dword [esp + 4], str.Failed_to_extract__s:_failed_to_allocate_temporary_input_buffer__n
xor edi, edi
mov dword [esp], str.malloc
add eax, 0x12
mov dword [esp + 8], eax
call fcn.00403100
jmp 0x40182e
add eax, 0x12
mov dword [esp + 4], str.Failed_to_extract__s:_failed_to_allocate_temporary_output_buffer__n
xor edi, edi
mov dword [esp + 8], eax
mov dword [esp], str.malloc
call fcn.00403100
jmp 0x40182e
mov esi, dword [esp + 0x20]
mov ebx, eax
jmp 0x40182e