Function at 0x40e710
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28c
mov edx, dword [ebp + 8]
push ebx
push esi
lea esi, [ebp - 0x28c]
mov dword [ebp - 4], ecx
push edi
sub esi, edx
lea ebx, [ebx]
mov al, byte [edx]
lea edx, [edx + 1]
mov byte [esi + edx - 1], al
test al, al
jne 0x40e730
lea eax, [ebp - 0x28c]
push eax
call fcn.0041be90
mov esi, dword [ebp + 0x10]
lea ecx, [ebp - 0x8c]
mov edi, dword [ebp + 0xc]
add esp, 4
mov dword [ebp - 8], esi
push 0
push 0
push 0
call fcn.0041c660
push 0
push 0
push 0
lea ecx, [ebp - 0x5c]
call fcn.0041c660
cmp byte [ebp + 0x14], 0
je 0x40e7eb
lea ebx, [edi + esi]
xor edx, edx
mov ecx, ebx
mov dword [ebp + 0x14], ebx
sub ecx, edi
xor esi, esi
xor eax, eax
cmp edi, ebx
cmova ecx, edx
test ecx, ecx
je 0x40e7a4
cmp byte [eax + edi], 0xa
jne 0x40e79e
add esi, 2
jmp 0x40e79f
inc esi
inc eax
cmp eax, ecx
jb 0x40e793
push esi
lea ecx, [ebp - 0x8c]
call fcn.0041cbd0
mov eax, dword [ebp - 0x8c]
sub ebx, edi
xor edx, edx
xor ecx, ecx
cmp edi, dword [ebp + 0x14]
cmova ebx, edx
test ebx, ebx
je 0x40e7e6
mov dl, byte [edi]
cmp dl, 0xa
jne 0x40e7d7
mov word [eax], 0xa0d
add eax, 2
jmp 0x40e7da
mov byte [eax], dl
inc eax
inc ecx
inc edi
cmp ecx, ebx
jb 0x40e7c6
mov eax, dword [ebp - 0x8c]
mov edi, eax
mov dword [ebp - 8], esi
lea eax, [ebp + 8]
push eax
call fcn.0041c150
push esi
lea eax, [ebp + 8]
push edi
push eax
call fcn.0041c160
lea eax, [ebp + 8]
push eax
call fcn.0041c140
mov ebx, dword [ebp + 0x18]
add esp, 0x14
cmp ebx, 0xe
jne 0x40e97b
lea eax, [ebp + 0x10]
mov dword [ebp + 0x10], 0
push eax
push esi
push edi
call fcn.00412ca0
mov edi, eax
add esp, 0xc
test edi, edi
je 0x40e96b
mov esi, dword [ebp + 0x10]
cmp esi, 0x11
jb 0x40e96b
add esi, 0xfffffff8
lea ecx, [ebp - 0x5c]
push esi
call fcn.0041cbd0
push 9
lea ecx, [ebp - 0x5c]
call fcn.00410be0
push 0x26
lea ecx, [ebp - 0x5c]
call fcn.00410be0
push 2
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], 5
push eax
lea ecx, [ebp - 0x5c]
call fcn.0041d370
push 5
lea eax, [edi + 0xc]
push eax
lea ecx, [ebp - 0x5c]
call fcn.0041d370
mov eax, dword [ebp + 0x10]
lea ecx, [ebp - 0x5c]
add eax, 0xffffffef
push eax
lea eax, [edi + 0x11]
push eax
call fcn.0041d370
push edi
call fcn.0040db80
mov edi, dword [ebp - 0x5c]
add esp, 4
lea ecx, [ebp - 0x2c]
call fcn.0040e4a0
lea eax, [ebp - 0x28c]
push eax
lea ecx, [ebp + 0x16]
call fcn.0041f5d0
mov ax, word [ebp + 0x16]
lea ecx, [ebp - 0x2c]
mov word [ebp - 0x2c], ax
mov eax, dword [ebp - 4]
add eax, 0xc
push ecx
mov ecx, eax
mov dword [ebp + 0x14], eax
call fcn.0040f0e0
cmp eax, 0xffffffff
je 0x40e98e
imul ebx, eax, 0x34
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
add ebx, eax
mov eax, dword [ebx + 0x1c]
test eax, eax
je 0x40e8fb
push eax
call fcn.0040db80
add esp, 4
mov eax, dword [ebp + 0x18]
push esi
mov dword [ebx + 0x30], eax
call fcn.0040dba0
push esi
push edi
push eax
mov dword [ebx + 0x1c], eax
call fcn.004239f0
mov eax, dword [ebp - 8]
add esp, 0x10
mov dword [ebx + 0x14], esi
mov esi, dword [ebp - 4]
mov dword [ebx + 0x18], eax
mov eax, dword [ebp + 8]
mov dword [ebx + 0x24], eax
mov eax, dword [esi + 0x34]
cmp eax, 0xffffffff
je 0x40e9f8
push eax
call fcn.0040f050
add esp, 4
mov dword [ebx + 0x28], eax
lea eax, [ebp + 0x14]
push 0
push eax
push dword [ebx + 0x14]
push dword [ebx + 0x1c]
push dword [esi + 0x34]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebx + 0x1c]
call fcn.0040db80
add esp, 4
mov dword [ebx + 0x1c], 0
jmp 0x40e9f8
push str.ZipFile:_LZMA_compression_failed_n
call dword [sym.imp.tier0.dll_Warning]
jmp 0x40ea05
test ebx, ebx
je 0x40e8a4
push str.Calling_AddBufferToZip_with_unknown_compression_type_n
call dword [sym.imp.tier0.dll_Error]
mov eax, dword [ebp - 8]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x28], esi
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x18], eax
test esi, esi
jle 0x40e9e5
push esi
call fcn.0040dba0
push esi
push edi
push eax
mov dword [ebp - 0x20], eax
call fcn.004239f0
mov ebx, dword [ebp - 4]
add esp, 0x10
mov eax, dword [ebx + 0x34]
cmp eax, 0xffffffff
je 0x40e9ec
push eax
call fcn.0040f050
push dword [ebp - 0x28]
mov dword [ebp - 0x14], eax
push dword [ebp - 0x20]
push dword [ebx + 0x34]
call fcn.0040f0a0
push dword [ebp - 0x20]
call fcn.0040db80
add esp, 0x14
mov dword [ebp - 0x20], 0
mov ecx, dword [ebp + 0x14]
lea eax, [ebp - 0x2c]
push eax
call fcn.0040f5e0
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40ea08
push eax
call fcn.0040db80
add esp, 4
cmp dword [ebp - 0x54], 0
jl 0x40ea30
mov edx, dword [ebp - 0x5c]
test edx, edx
je 0x40ea29
mov eax, dword [sym.imp.tier0.dll_g_pMemAlloc]
push edx
mov ecx, dword [eax]
mov eax, dword [ecx]
call dword [eax + 0x14]
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0
cmp dword [ebp - 0x84], 0
jl 0x40ea50
mov edx, dword [ebp - 0x8c]
test edx, edx
je 0x40ea50
mov eax, dword [sym.imp.tier0.dll_g_pMemAlloc]
push edx
mov ecx, dword [eax]
mov eax, dword [ecx]
call dword [eax + 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14