Function at 0x1004c230
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100c2d28
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x1010e070]
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 0x1004c437
cmp byte [ebx + 0x3d], 0
je 0x1004c437
call fcn.1003cdd0
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.1003cd90
add esp, 8
test al, al
je 0x1004c2a1
xor al, al
jmp 0x1004c439
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.1004c5e0
sub eax, 0
je 0x1004c31d
sub eax, 1
je 0x1004c321
mov esi, dword [ebp - 0x14]
sub eax, 2
mov eax, dword [ebp - 0x28]
je 0x1004c3e9
xor bl, bl
jmp 0x1004c3eb
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 0x1004c359
push dword [ebx + 0x4c]
cmp esi, 0x10
lea ecx, [ebp - 0x28]
push edi
cmovae ecx, eax
push 1
push ecx
call fcn.100a00c7
mov esi, dword [ebp - 0x14]
add esp, 0x10
cmp edi, eax
mov eax, dword [ebp - 0x28]
jne 0x1004c316
cmp byte [ebx + 0x3d], 0
je 0x1004c3e9
test edi, edi
jne 0x1004c2d7
mov edx, dword [ebp - 0x18]
or ecx, 0xffffffff
sub ecx, edx
cmp ecx, 8
jbe 0x1004c3df
lea edi, [edx + 8]
cmp edi, 0xfffffffe
ja 0x1004c3df
cmp esi, edi
jae 0x1004c3c7
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 0x1004c2d7
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 0x1004c2d1
test edi, edi
jne 0x1004c39c
cmp esi, 0x10
mov dword [ebp - 0x18], edi
lea ecx, [ebp - 0x28]
cmovae ecx, eax
mov byte [ecx], 0
jmp 0x1004c2d1
push str.string_too_long
call fcn.1008a225
mov bl, 1
cmp esi, 0x10
jb 0x1004c433
lea ecx, [esi + 1]
cmp ecx, 0x1000
jb 0x1004c42a
test byte [ebp - 0x28], 0x1f
je 0x1004c406
call fcn.10091aa1
mov ecx, dword [eax - 4]
cmp ecx, eax
jb 0x1004c412
call fcn.10091aa1
sub eax, ecx
cmp eax, 4
jae 0x1004c41e
call fcn.10091aa1
cmp eax, 0x23
jbe 0x1004c428
call fcn.10091aa1
mov eax, ecx
push eax
call fcn.1008bb42
add esp, 4
mov al, bl
jmp 0x1004c439
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.1008bb47
mov esp, ebp
pop ebp
ret