Function at 0x4047d0
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 0x404ae8
cmp eax, 0x10015
jg 0x40490b
lea eax, [edi + eax]
mov esi, edi
mov dword [ebp - 0x10], eax
mov ebx, dword [ebp - 0x10]
sub ebx, 4
cmp esi, ebx
jbe 0x404819
jmp 0x40491e
dec ebx
cmp esi, ebx
ja 0x40491e
cmp byte [ebx], 0x50
jne 0x404810
push ebx
call fcn.00404780
pop ecx
cmp eax, 0x6054b50
jne 0x404810
mov esi, dword [ebp - 0x10]
sub esi, ebx
cmp esi, 0x15
jle 0x404b6c
lea eax, [ebx + 4]
push eax
call fcn.004047b0
mov ecx, dword [ebp + 8]
mov word [ecx + 8], ax
lea eax, [ebx + 6]
mov dword [esp], eax
call fcn.004047b0
mov edx, dword [ebp + 8]
mov word [edx + 0xa], ax
lea eax, [ebx + 8]
mov dword [esp], eax
call fcn.004047b0
mov ecx, dword [ebp + 8]
mov word [ecx + 0xc], ax
lea eax, [ebx + 0xa]
mov dword [esp], eax
call fcn.004047b0
mov edx, dword [ebp + 8]
mov word [edx + 0xe], ax
lea eax, [ebx + 0xc]
mov dword [esp], eax
call fcn.00404780
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x10], eax
lea eax, [ebx + 0x10]
mov dword [esp], eax
call fcn.00404780
mov edx, dword [ebp + 8]
mov dword [edx + 0x14], eax
lea eax, [ebx + 0x14]
mov dword [esp], eax
call fcn.004047b0
mov ecx, dword [ebp + 8]
test ax, ax
pop edx
mov edx, eax
mov word [ecx + 0x18], ax
je 0x4048d6
and edx, 0xffff
lea eax, [edx + 0x16]
cmp esi, eax
jl 0x404b79
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 0x4048ec
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xc]
cmp dx, word [ecx + 0xe]
je 0x404943
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 0x40493b
lea eax, [edi + eax]
mov esi, eax
mov dword [ebp - 0x10], eax
sub esi, 0x10015
jmp 0x4047fd
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 0x404b65
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 0x404a5c
jmp 0x404b48
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.004047b0
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 0x404b65
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.00404780
pop ebx
cmp eax, 0x2014b50
jne 0x404b08
lea eax, [esi + 0xa]
push eax
call fcn.004047b0
mov word [edi + 8], ax
lea eax, [esi + 0x14]
mov dword [esp], eax
call fcn.00404780
mov dword [edi + 0x10], eax
lea eax, [esi + 0x18]
mov dword [esp], eax
call fcn.00404780
mov dword [edi + 0xc], eax
lea eax, [esi + 0x1c]
mov dword [esp], eax
call fcn.004047b0
mov dword [edi], eax
mov ebx, eax
lea eax, [esi + 0x1e]
mov dword [esp], eax
call fcn.004047b0
mov dword [ebp - 0x14], eax
lea eax, [esi + 0x20]
mov dword [esp], eax
call fcn.004047b0
mov dword [ebp - 0x18], eax
lea eax, [esi + 0x2a]
mov dword [esp], eax
add esi, 0x2e
call fcn.00404780
pop ecx
mov dword [ebp - 0x20], esi
test ebx, ebx
jne 0x4049b2
mov dword [edi + 4], 0
jmp 0x4049b5
push ebx
push eax
push str.Length_is__d____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 0x40493b
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 0x40493b
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 0x404b23
xor eax, eax
jmp 0x40493b
push esi
push 0x16
push str._Zip_EOCD:_expected____d_bytes__found__d_n
jmp 0x404aef
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 0x40493b