Function at 0x40aff0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5f0
mov eax, dword [0x5861a0]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
push 0
push 0
push 0
push 0
push 0x400
lea edx, [ebp - 0x184]
mov dword [ebp - 0x5ec], ecx
push edx
lea ecx, [ebp - 0x5d4]
push ecx
push eax
mov dword [ebp - 0x5dc], eax
call fcn.0040ba20
mov esi, eax
add esp, 0x20
test esi, esi
je 0x40b066
push esi
push str.error__d_with_zipfile_in_unzGetCurrentFileInfo_n
call fcn.0050f775
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0050e45c
mov esp, ebp
pop ebp
ret
push 0x2000
call fcn.0050e4bd
add esp, 4
mov dword [ebp - 0x5d8], eax
test eax, eax
jne 0x40b0a0
push str.Error_allocating_memory_n
call fcn.0050f775
add esp, 4
mov eax, 0xffffff98
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0050e45c
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x40b0c2
lea edx, [ebp - 0x184]
push edx
push edi
lea eax, [ebp - 0x584]
push 0x537ee0
push eax
call fcn.0050f6b2
add esp, 0x10
jmp 0x40b0e3
xor eax, eax
jmp 0x40b0d0
mov cl, byte [ebp + eax - 0x184]
mov byte [ebp + eax - 0x584], cl
inc eax
test cl, cl
jne 0x40b0d0
mov al, byte [ebp - 0x584]
lea ebx, [ebp - 0x584]
mov dword [ebp - 0x5e8], ebx
mov ecx, ebx
test al, al
je 0x40b3a9
nop
cmp al, 0x2f
je 0x40b108
cmp al, 0x5c
jne 0x40b113
lea edx, [ecx + 1]
mov dword [ebp - 0x5e8], edx
mov ebx, edx
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x40b100
cmp byte [ebx], al
je 0x40b3a9
mov eax, dword [ebp + 0x10]
cmp dword [eax], 0
mov dword [ebp - 0x5f0], 0
jne 0x40b143
lea esi, [ebp - 0x584]
mov dword [ebp - 0x5e0], esi
jmp 0x40b14b
mov dword [ebp - 0x5e0], ebx
mov esi, ebx
mov ecx, dword [ebp - 0x5dc]
push ecx
call fcn.0040c0a0
mov edi, eax
add esp, 4
test edi, edi
je 0x40b18d
push edi
push str.error__d_with_zipfile_in_unzOpenCurrentFile_n
call fcn.0050f775
mov edx, dword [ebp - 0x5d8]
push edx
call fcn.0050e551
add esp, 0xc
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0050e45c
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x5ec]
cmp dword [edi], 0
jne 0x40b226
push 0x538aec
push esi
call fcn.00510665
add esp, 8
test eax, eax
je 0x40b1fd
push eax
call fcn.00510364
add esp, 4
jmp 0x40b1c0
push esi
push str.The_file__s_exist._Overwrite____y_es___n_o___A_ll:
call fcn.0050f775
lea eax, [ebp - 0x84]
push eax
push 0x53a79c
call fcn.005118c9
mov al, byte [ebp - 0x84]
add esp, 0x10
lea ecx, [eax - 0x61]
cmp cl, 0x19
ja 0x40b1ef
sub al, 0x20
cmp al, 0x59
je 0x40b203
cmp al, 0x4e
je 0x40b207
cmp al, 0x41
jne 0x40b1c0
jmp 0x40b203
mov al, byte [ebp - 0x5e1]
cmp al, 0x4e
jne 0x40b20e
mov ecx, 1
jmp 0x40b214
mov ecx, dword [ebp - 0x5f0]
cmp al, 0x41
jne 0x40b21e
mov dword [edi], 1
test ecx, ecx
jne 0x40b36d
push 0x539100
push esi
call fcn.00510665
mov edi, eax
add esp, 8
test edi, edi
jne 0x40b2a3
mov edx, dword [ebp + 0x10]
cmp dword [edx], eax
jne 0x40b275
lea eax, [ebp - 0x584]
cmp ebx, eax
je 0x40b275
mov bl, byte [ebx - 1]
mov edi, dword [ebp - 0x5e8]
push esi
mov byte [edi - 1], 0
call fcn.0040af10
push 0x539100
push esi
mov byte [edi - 1], bl
call fcn.00510665
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x40b2a3
push esi
push str.error_opening__s_n
call fcn.0050f775
mov ecx, dword [ebp - 0x5d8]
push ecx
call fcn.0050e551
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0050e45c
mov esp, ebp
pop ebp
ret
push esi
push str._extracting:__s_n
call fcn.0050f775
add esp, 8
mov ebx, dword [ebp - 0x5d8]
mov edx, dword [ebp - 0x5dc]
push 0x2000
push ebx
push edx
call fcn.0040bcb0
mov esi, eax
add esp, 0xc
test esi, esi
js 0x40b35d
jle 0x40b2fa
push edi
push 1
push esi
push ebx
call fcn.0051052f
add esp, 0x10
cmp eax, 1
je 0x40b2b1
push str.error_in_writing_extracted_file_n
call fcn.0050f775
add esp, 4
or esi, 0xffffffff
push edi
call fcn.00510364
add esp, 4
test esi, esi
jne 0x40b398
mov ecx, dword [ebp - 0x59c]
mov edx, dword [ebp - 0x598]
sub esp, 0x18
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [ebp - 0x594]
mov dword [eax + 4], edx
mov edx, dword [ebp - 0x590]
mov dword [eax + 8], ecx
mov ecx, dword [ebp - 0x58c]
mov dword [eax + 0xc], edx
mov edx, dword [ebp - 0x588]
mov dword [eax + 0x10], ecx
mov ecx, dword [ebp - 0x5e0]
mov dword [eax + 0x14], edx
mov eax, dword [ebp - 0x5c4]
push eax
push ecx
call fcn.0040ae80
add esp, 0x20
jmp 0x40b373
push esi
push str.error__d_with_zipfile_in_unzReadCurrentFile_n
call fcn.0050f775
add esp, 8
jmp 0x40b2fa
mov ebx, dword [ebp - 0x5d8]
mov edx, dword [ebp - 0x5dc]
push edx
call fcn.0040be60
mov esi, eax
add esp, 4
test esi, esi
je 0x40b3af
push esi
push str.error__d_with_zipfile_in_unzCloseCurrentFile_n
call fcn.0050f775
add esp, 8
jmp 0x40b3af
mov eax, dword [ebp - 0x5dc]
push eax
call fcn.0040be60
add esp, 4
jmp 0x40b3af
mov ebx, dword [ebp - 0x5d8]
push ebx
call fcn.0050e551
mov ecx, dword [ebp - 4]
add esp, 4
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.0050e45c
mov esp, ebp
pop ebp
ret