Function at 0x4064c0
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x4408
call fcn.0040ef40
push ebx
push ebp
mov ebp, dword [esp + 0x4414]
push esi
push edi
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ebp
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea ebx, [esp + 0x418]
mov eax, ecx
mov esi, edi
mov edi, ebx
lea ebx, [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
cmp edx, 3
rep movsb byte es:[edi], byte [esi]
jbe 0x406571
mov esi, 0x41e264
lea eax, [edx + ebp - 3]
mov bl, byte [eax]
mov cl, bl
cmp bl, byte [esi]
jne 0x40655c
test cl, cl
je 0x406558
mov bl, byte [eax + 1]
mov cl, bl
cmp bl, byte [esi + 1]
jne 0x40655c
add eax, 2
add esi, 2
test cl, cl
jne 0x406538
xor eax, eax
jmp 0x406561
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x406571
mov esi, ebp
mov byte [esp + edx + 0x15], al
mov dword [esp + 0x10], esi
jmp 0x4065b1
lea ecx, [esp + 0x418]
mov edi, 0x41e264
mov dword [esp + 0x10], ecx
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x418]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x10]
push 0x41e260
push esi
call fcn.00402f80
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x4065e9
mov eax, dword [0x42e890]
push esi
push str.decompress:_Cant_gzopen__s_n
push eax
call fcn.00406840
add esp, 0xc
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4408
ret
push ebp
call fcn.004039f0
add esp, 4
test al, 8
je 0x406694
mov edi, dword [sym.imp.MSVCRT.dll_strrchr]
lea ecx, [esp + 0x18]
push 0x2f
push ecx
lea ebx, [esp + 0x20]
call edi
add esp, 8
test eax, eax
jne 0x406624
lea edx, [esp + 0x18]
push 0x5c
push edx
call edi
add esp, 8
test eax, eax
je 0x406627
lea ebx, [eax + 1]
push ebp
call fcn.00403a00
mov edx, eax
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
mov eax, ebx
lea edi, [esp + 0x18]
dec ecx
sub eax, edi
add ecx, eax
cmp ecx, 0x400
jl 0x406675
mov ecx, dword [0x42e890]
push esi
push str.decompress:_Name_too_long__s_n
push ecx
call fcn.00406840
add esp, 0xc
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4408
ret
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x18]
push 0x41e218
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
jne 0x4066e5
call dword [sym.imp.MSVCRT.dll__errno]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.MSVCRT.dll_strerror]
lea edx, [esp + 0x1c]
push eax
mov eax, dword [0x42e890]
push edx
push str.decompress:_Cant_open_output_file__s:__s
push eax
call fcn.00406840
add esp, 0x14
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4408
ret
mov ebx, dword [sym.imp.MSVCRT.dll_fwrite]
lea ecx, [esp + 0x418]
push 0x4000
push ecx
push ebp
call fcn.00403510
mov esi, eax
add esp, 0xc
test esi, esi
jl 0x406724
push edi
je 0x406792
push esi
lea edx, [esp + 0x420]
push 1
push edx
call ebx
add esp, 0x10
cmp eax, esi
jne 0x406759
jmp 0x4066eb
lea eax, [esp + 0x14]
push eax
push ebp
call fcn.004038e0
mov ecx, dword [esp + 0x18]
mov edx, dword [0x42e890]
push eax
push ecx
push str.decompress:_Error_reading_input_file__s:__s_n
push edx
call fcn.00406840
add esp, 0x18
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4408
ret
call dword [sym.imp.MSVCRT.dll__errno]
mov eax, dword [eax]
push eax
call dword [sym.imp.MSVCRT.dll_strerror]
mov edx, dword [0x42e890]
lea ecx, [esp + 0x1c]
push eax
push ecx
push str.decompress:_Error_writing_output_file__s:__s_n
push edx
call fcn.00406840
add esp, 0x14
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4408
ret
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
test eax, eax
je 0x4067d8
call dword [sym.imp.MSVCRT.dll__errno]
mov eax, dword [eax]
push eax
call dword [sym.imp.MSVCRT.dll_strerror]
mov edx, dword [0x42e890]
lea ecx, [esp + 0x1c]
push eax
push ecx
push str.decompress:_Failed_to_close_output_file__s:__s_n
push edx
call fcn.00406840
add esp, 0x14
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4408
ret
push ebp
call fcn.00403860
add esp, 4
test eax, eax
je 0x40681a
lea eax, [esp + 0x14]
push eax
push ebp
call fcn.004038e0
mov ecx, dword [esp + 0x18]
mov edx, dword [0x42e890]
push eax
push ecx
push str.decompress:_Failed_to_close_input_file__s:__s_n
push edx
call fcn.00406840
add esp, 0x18
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4408
ret
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.MSVCRT.dll__unlink]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4408
ret