Function at 0x4150e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x46fdc8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x48
push ebx
push esi
push edi
mov edi, ecx
call fcn.00409c70
movzx eax, ax
mov dword [esp + 0x24], eax
lea eax, [ebp + 8]
push eax
lea eax, [esp + 0x28]
push eax
call fcn.00409c30
add esp, 8
test al, al
je 0x41516f
call fcn.00409c70
mov ecx, dword [ebp + 8]
cmp cx, ax
je 0x41514b
movzx ecx, cx
mov ax, cx
mov ecx, dword [esp + 0x54]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
call fcn.00409c70
xor ecx, ecx
test ax, ax
sete cl
mov ax, cx
mov ecx, dword [esp + 0x54]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, edi
call fcn.00409c10
test eax, eax
je 0x4151b8
mov eax, dword [edi + 0x30]
mov ecx, dword [eax]
mov eax, dword [edi + 0x20]
mov eax, dword [eax]
lea esi, [eax + ecx*2]
mov ecx, edi
call fcn.00409c10
cmp eax, esi
jae 0x4151b8
movzx esi, word [ebp + 8]
mov ecx, edi
call fcn.00409b70
mov word [eax], si
mov ax, word [ebp + 8]
mov ecx, dword [esp + 0x54]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp dword [edi + 0x50], 0
jne 0x4151d7
call fcn.00409c70
mov ecx, dword [esp + 0x54]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, edi
call fcn.00409130
lea ecx, [edi + 0x44]
cmp eax, ecx
jne 0x4151fe
mov eax, dword [edi + 0xc]
mov edx, dword [edi + 0x3c]
mov ecx, dword [edi + 0x38]
mov dword [eax], ecx
mov eax, dword [edi + 0x1c]
mov dword [eax], edx
mov eax, dword [edi + 0x2c]
sub edx, edx
sar edx, 1
mov dword [eax], edx
cmp dword [edi + 0x40], 0
jne 0x415250
push dword [edi + 0x50]
push dword [ebp + 8]
call fcn.004561cd
mov ecx, 0xffff
add esp, 8
cmp ax, cx
je 0x415234
movzx eax, word [ebp + 8]
mov ecx, dword [esp + 0x54]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
call fcn.00409c70
movzx eax, ax
mov ecx, dword [esp + 0x54]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
movzx eax, word [ebp + 8]
lea ecx, [esp + 0x13]
mov dword [esp + 0x1c], eax
call fcn.00402cb0
lea ecx, [esp + 0x38]
push eax
call fcn.004077e0
lea ecx, [esp + 0x38]
push 0
push 0
call fcn.004086c0
push 0
push 8
lea ecx, [esp + 0x40]
call fcn.00408760
test al, al
je 0x4152a9
lea ecx, [esp + 0x38]
mov byte [esp + 0x14], 0
call fcn.004082e0
xorps xmm0, xmm0
push 8
lea ecx, [esp + 0x3c]
movq qword [eax], xmm0
call fcn.00408850
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x3c]
mov dword [esp + 0x60], 0
call fcn.00406e10
mov ecx, eax
call fcn.00402c90
lea ecx, [esp + 0x38]
mov esi, eax
call fcn.00407840
add esi, eax
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x3c]
call fcn.00406e10
mov ecx, eax
call fcn.00402c90
mov ecx, dword [edi + 0x40]
lea ebx, [esp + 0x20]
mov edx, dword [ecx]
push ebx
push esi
push eax
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x2e]
push eax
lea eax, [esp + 0x30]
push eax
lea eax, [edi + 0x48]
push eax
call dword [edx + 0x1c]
test eax, eax
js 0x415435
cmp eax, 1
jg 0x41548f
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x3c]
call fcn.00406e10
mov ecx, eax
call fcn.00402c90
mov esi, dword [esp + 0x20]
sub esi, eax
je 0x415364
push dword [edi + 0x50]
lea eax, [esp + 0x38]
push esi
push 1
push eax
lea ecx, [esp + 0x48]
call fcn.00406e10
mov ecx, eax
call fcn.00402c90
push eax
call fcn.0045708a
add esp, 0x10
cmp esi, eax
jne 0x41545d
lea eax, [esp + 0x1c]
mov byte [edi + 0x46], 1
cmp dword [esp + 0x24], eax
jne 0x415483
test esi, esi
jne 0x4153d4
lea ecx, [esp + 0x38]
call fcn.00407840
cmp eax, 0x20
jae 0x415476
mov ecx, dword [esp + 0x48]
or eax, 0xffffffff
sub eax, ecx
cmp eax, 8
jbe 0x41546d
lea ebx, [ecx + 8]
push esi
push ebx
lea ecx, [esp + 0x40]
call fcn.00408760
test al, al
je 0x4153d4
mov esi, dword [esp + 0x48]
lea ecx, [esp + 0x38]
mov byte [esp + 0x18], 0
call fcn.004082e0
xorps xmm0, xmm0
push ebx
lea ecx, [esp + 0x3c]
movq qword [eax + esi], xmm0
call fcn.00408850
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x3c]
call fcn.00406e10
mov ecx, eax
call fcn.00402c90
lea ecx, [esp + 0x38]
mov esi, eax
call fcn.00407840
add esi, eax
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x3c]
call fcn.00406e10
mov ecx, eax
call fcn.00402c90
mov ecx, dword [edi + 0x40]
lea ebx, [esp + 0x20]
mov edx, dword [ecx]
push ebx
push esi
push eax
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x2e]
push eax
lea eax, [esp + 0x30]
push eax
lea eax, [edi + 0x48]
push eax
call dword [edx + 0x1c]
test eax, eax
jns 0x415312
call fcn.00409c70
lea ecx, [esp + 0x38]
movzx esi, ax
call fcn.00408190
mov ecx, dword [esp + 0x54]
pop edi
mov ax, si
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4
call fcn.00409c70
movzx eax, ax
movzx eax, ax
movzx eax, ax
jmp 0x41543a
lea ecx, [esp + 0x38]
call fcn.00407a80
call fcn.00409c70
movzx eax, ax
movzx eax, ax
jmp 0x41543a
movzx eax, word [ebp + 8]
movzx eax, ax
movzx eax, ax
jmp 0x41543a
cmp eax, 3
jne 0x415435
push dword [edi + 0x50]
push dword [esp + 0x20]
call fcn.00410460
add esp, 8
test al, al
je 0x4154ad
movzx eax, word [ebp + 8]
jmp 0x41543a
call fcn.00409c70
movzx eax, ax
jmp 0x41543a