Function at 0x417520
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov edi, dword [eax]
mov eax, dword [eax + 4]
cmp eax, 0x15
jle 0x417838
cmp eax, 0x10015
jg 0x41765b
lea eax, [edi + eax]
mov esi, edi
mov dword [ebp - 0x10], eax
mov ebx, dword [ebp - 0x10]
sub ebx, 4
cmp esi, ebx
jbe 0x417569
jmp 0x41766e
dec ebx
cmp esi, ebx
ja 0x41766e
cmp byte [ebx], 0x50
jne 0x417560
push ebx
call fcn.004174d0
pop ecx
cmp eax, 0x6054b50
jne 0x417560
mov esi, dword [ebp - 0x10]
sub esi, ebx
cmp esi, 0x15
jle 0x4178bc
lea eax, [ebx + 4]
push eax
call fcn.00417500
mov ecx, dword [ebp + 8]
mov word [ecx + 8], ax
lea eax, [ebx + 6]
mov dword [esp], eax
call fcn.00417500
mov edx, dword [ebp + 8]
mov word [edx + 0xa], ax
lea eax, [ebx + 8]
mov dword [esp], eax
call fcn.00417500
mov ecx, dword [ebp + 8]
mov word [ecx + 0xc], ax
lea eax, [ebx + 0xa]
mov dword [esp], eax
call fcn.00417500
mov edx, dword [ebp + 8]
mov word [edx + 0xe], ax
lea eax, [ebx + 0xc]
mov dword [esp], eax
call fcn.004174d0
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x10], eax
lea eax, [ebx + 0x10]
mov dword [esp], eax
call fcn.004174d0
mov edx, dword [ebp + 8]
mov dword [edx + 0x14], eax
lea eax, [ebx + 0x14]
mov dword [esp], eax
call fcn.00417500
mov ecx, dword [ebp + 8]
test ax, ax
pop edx
mov edx, eax
mov word [ecx + 0x18], ax
je 0x417626
and edx, 0xffff
lea eax, [edx + 0x16]
cmp esi, eax
jl 0x4178c9
mov edx, dword [ebp + 8]
lea eax, [ebx + 0x16]
mov dword [edx + 0x1c], eax
mov ecx, dword [ebp + 8]
mov esi, dword [ecx + 8]
test esi, esi
jne 0x41763c
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xc]
cmp dx, word [ecx + 0xe]
je 0x417693
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push 0x1f
push 1
push str.Archive_spanning_not_supported_n
call sub.msvcrt.dll_fwrite
or eax, 0xffffffff
add esp, 0x10
jmp 0x41768b
lea eax, [edi + eax]
mov esi, eax
mov dword [ebp - 0x10], eax
sub esi, 0x10015
jmp 0x41754d
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push 0x18
push 1
push str.EOCD_not_found__not_Zip_n
call sub.msvcrt.dll_fwrite
or eax, 0xffffffff
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test dx, dx
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x14]
je 0x4178b5
sub esp, 0xc
lea esi, [eax + edi]
push 0x1c
call sub.msvcrt.dll_malloc
mov edi, eax
add esp, 0x10
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0
mov dword [eax + 0x18], 0
mov dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x10]
sub eax, esi
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0x2d
jg 0x4177ac
jmp 0x417898
mov dword [edi + 4], esi
mov edx, dword [edi]
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x1c], edx
mov ebx, dword [ecx]
lea esi, [eax + edx + 0x1e]
lea eax, [eax + ebx + 0x1c]
push eax
call fcn.00417500
and eax, 0xffff
pop edx
add esi, eax
add ebx, esi
mov dword [edi + 0x14], ebx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x20]
mov dword [edi + 0x18], eax
mov dword [edx + 0x20], edi
mov edi, dword [ebp - 0x24]
inc edi
mov dword [ebp - 0x24], edi
mov ax, word [edx + 0xe]
and eax, 0xffff
cmp eax, dword [ebp - 0x24]
jle 0x4178b5
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x18]
add edx, ebx
and eax, 0xffff
sub esp, 0xc
and ecx, 0xffff
add eax, edx
push 0x1c
lea esi, [ecx + eax]
call sub.msvcrt.dll_malloc
add esp, 0x10
mov edi, eax
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0
mov dword [eax + 0x18], 0
push esi
call fcn.004174d0
pop ebx
cmp eax, 0x2014b50
jne 0x417858
lea eax, [esi + 0xa]
push eax
call fcn.00417500
mov word [edi + 8], ax
lea eax, [esi + 0x14]
mov dword [esp], eax
call fcn.004174d0
mov dword [edi + 0x10], eax
lea eax, [esi + 0x18]
mov dword [esp], eax
call fcn.004174d0
mov dword [edi + 0xc], eax
lea eax, [esi + 0x1c]
mov dword [esp], eax
call fcn.00417500
mov dword [edi], eax
mov ebx, eax
lea eax, [esi + 0x1e]
mov dword [esp], eax
call fcn.00417500
mov dword [ebp - 0x14], eax
lea eax, [esi + 0x20]
mov dword [esp], eax
call fcn.00417500
mov dword [ebp - 0x18], eax
lea eax, [esi + 0x2a]
mov dword [esp], eax
add esi, 0x2e
call fcn.004174d0
pop ecx
mov dword [ebp - 0x20], esi
test ebx, ebx
jne 0x417702
mov dword [edi + 4], 0
jmp 0x417705
push ebx
push eax
push str.Length_is__zd____too_small_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
call sub.msvcrt.dll_fprintf
or eax, 0xffffffff
add esp, 0x10
jmp 0x41768b
mov ebx, dword [sym.imp.msvcrt.dll__iob]
lea eax, [ebx + 0x40]
push eax
push 0x27
push 1
push str.Whoops:_didnt_find_expected_signature_n
call sub.msvcrt.dll_fwrite
add esp, 0x10
lea eax, [ebx + 0x40]
push eax
push 0x24
push 1
push str.read_central_directory_entry_failed_n
call sub.msvcrt.dll_fwrite
mov dword [esp], edi
call sub.msvcrt.dll_free
or eax, 0xffffffff
add esp, 0x10
jmp 0x41768b
mov ebx, dword [sym.imp.msvcrt.dll__iob]
lea eax, [ebx + 0x40]
push eax
push 0x1b
push 1
push str.cde_entry_not_large_enough_n
call sub.msvcrt.dll_fwrite
add esp, 0x10
jmp 0x417873
xor eax, eax
jmp 0x41768b
push esi
push 0x16
push str._Zip_EOCD:_expected____d_bytes__found__d_n
jmp 0x41783f
sub esp, 0xc
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push esi
push edx
push 0x16
push str.EOCD__d___comment__d__exceeds_len___d__n
push eax
call sub.msvcrt.dll_fprintf
or eax, 0xffffffff
add esp, 0x20
jmp 0x41768b