Function at 0x1004ae60
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100c1628
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x1010b070]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
cmp dword [ebx + 0x38], 0
je 0x1004b067
cmp byte [ebx + 0x3d], 0
je 0x1004b067
call fcn.1003b9f0
mov edx, dword [ebx]
mov esi, eax
push esi
mov ecx, ebx
call dword [edx + 0xc]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], esi
push eax
call fcn.1003b9b0
add esp, 8
test al, al
je 0x1004aed1
xor al, al
jmp 0x1004b069
mov ecx, 0xf
mov byte [ebp - 0x28], 0
xorps xmm0, xmm0
mov dword [ebp - 0x14], ecx
cmp ecx, 0x10
movq qword [ebp - 0x28], xmm0
lea eax, [ebp - 0x28]
mov dword [ebp - 0x18], 8
cmovae eax, dword [ebp - 0x28]
mov byte [eax + 8], 0
mov dword [ebp - 4], 0
mov esi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
cmp esi, 0x10
lea edx, [ebp - 0x28]
lea ecx, [ebp - 0x28]
cmovae ecx, eax
cmovae edx, eax
lea eax, [ebp - 0x34]
push eax
mov eax, dword [ebp - 0x18]
add eax, edx
push eax
push ecx
mov ecx, dword [ebx + 0x38]
lea eax, [ebx + 0x40]
push eax
call fcn.1004b210
sub eax, 0
je 0x1004af4d
sub eax, 1
je 0x1004af51
mov esi, dword [ebp - 0x14]
sub eax, 2
mov eax, dword [ebp - 0x28]
je 0x1004b019
xor bl, bl
jmp 0x1004b01b
mov byte [ebx + 0x3d], 0
mov esi, dword [ebp - 0x14]
lea ecx, [ebp - 0x28]
mov eax, dword [ebp - 0x28]
cmp esi, 0x10
mov edi, dword [ebp - 0x34]
cmovae ecx, eax
sub edi, ecx
je 0x1004af89
push dword [ebx + 0x4c]
cmp esi, 0x10
lea ecx, [ebp - 0x28]
push edi
cmovae ecx, eax
push 1
push ecx
call fcn.1009ecf7
mov esi, dword [ebp - 0x14]
add esp, 0x10
cmp edi, eax
mov eax, dword [ebp - 0x28]
jne 0x1004af46
cmp byte [ebx + 0x3d], 0
je 0x1004b019
test edi, edi
jne 0x1004af07
mov edx, dword [ebp - 0x18]
or ecx, 0xffffffff
sub ecx, edx
cmp ecx, 8
jbe 0x1004b00f
lea edi, [edx + 8]
cmp edi, 0xfffffffe
ja 0x1004b00f
cmp esi, edi
jae 0x1004aff7
push edx
push edi
lea ecx, [ebp - 0x28]
call fcn.10005cba
mov esi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
test edi, edi
je 0x1004af07
cmp esi, 0x10
lea ecx, [ebp - 0x28]
xorps xmm0, xmm0
cmovae ecx, eax
mov eax, dword [ebp - 0x18]
movq qword [ecx + eax], xmm0
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 0x10
mov dword [ebp - 0x18], edi
cmovae eax, dword [ebp - 0x28]
mov byte [eax + edi], 0
jmp 0x1004af01
test edi, edi
jne 0x1004afcc
cmp esi, 0x10
mov dword [ebp - 0x18], edi
lea ecx, [ebp - 0x28]
cmovae ecx, eax
mov byte [ecx], 0
jmp 0x1004af01
push str.string_too_long
call fcn.10088e55
mov bl, 1
cmp esi, 0x10
jb 0x1004b063
lea ecx, [esi + 1]
cmp ecx, 0x1000
jb 0x1004b05a
test byte [ebp - 0x28], 0x1f
je 0x1004b036
call fcn.100906d1
mov ecx, dword [eax - 4]
cmp ecx, eax
jb 0x1004b042
call fcn.100906d1
sub eax, ecx
cmp eax, 4
jae 0x1004b04e
call fcn.100906d1
cmp eax, 0x23
jbe 0x1004b058
call fcn.100906d1
mov eax, ecx
push eax
call fcn.1008a772
add esp, 4
mov al, bl
jmp 0x1004b069
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1008a777
mov esp, ebp
pop ebp
ret