Function at 0x1004a800
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100c15b8
mov eax, dword fs:[0]
push eax
sub esp, 0x30
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
mov dword [ebp - 0x30], ebx
call fcn.1003b9f0
mov edi, eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], edi
push eax
call fcn.1003b9b0
add esp, 8
test al, al
je 0x1004a85f
lea eax, [ebp + 8]
push eax
call fcn.1003b9d0
add esp, 4
jmp 0x1004aa46
mov ecx, ebx
call fcn.1003dc20
test eax, eax
je 0x1004a89d
mov ecx, ebx
call fcn.1003dbb0
mov ecx, ebx
mov esi, eax
call fcn.1003dc20
cmp eax, esi
jae 0x1004a89d
mov ecx, ebx
call fcn.1003db00
mov esi, eax
lea eax, [ebp + 8]
push eax
call fcn.1003b990
mov byte [esi], al
add esp, 4
mov eax, dword [ebp + 8]
jmp 0x1004aa46
cmp dword [ebx + 0x4c], 0
je 0x1004a8d1
mov ecx, ebx
call fcn.1004ae00
cmp dword [ebx + 0x38], 0
lea eax, [ebp + 8]
jne 0x1004a8d8
push dword [ebx + 0x4c]
push eax
call fcn.1003b990
add esp, 4
movzx eax, al
push eax
call fcn.10048b80
add esp, 8
test al, al
cmovne edi, dword [ebp + 8]
mov eax, edi
jmp 0x1004aa46
push eax
call fcn.1003b990
mov ecx, 0xf
mov byte [ebp - 0x34], al
add esp, 4
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 - 0x28]
mov edi, dword [ebp - 0x14]
nop word [eax + eax]
cmp edi, 0x10
lea eax, [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 0x28]
cmovae edx, esi
lea ecx, [ebp - 0x28]
cmovae ecx, esi
add eax, edx
push eax
push ecx
mov ecx, dword [ebx + 0x38]
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x33]
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebx + 0x40]
push eax
call fcn.1003ba10
test eax, eax
js 0x1004a9f4
cmp eax, 1
jg 0x1004a9d0
mov edi, dword [ebp - 0x14]
lea eax, [ebp - 0x28]
mov esi, dword [ebp - 0x28]
cmp edi, 0x10
mov ebx, dword [ebp - 0x38]
cmovae eax, esi
sub ebx, eax
je 0x1004a99a
mov ecx, dword [ebp - 0x30]
lea eax, [ebp - 0x28]
cmp edi, 0x10
cmovae eax, esi
push dword [ecx + 0x4c]
push ebx
push 1
push eax
call fcn.1009ecf7
mov edi, dword [ebp - 0x14]
add esp, 0x10
mov esi, dword [ebp - 0x28]
cmp ebx, eax
jne 0x1004a9fa
mov eax, dword [ebp - 0x30]
mov byte [eax + 0x3d], 1
lea eax, [ebp - 0x34]
cmp dword [ebp - 0x3c], eax
jne 0x1004a9cb
test ebx, ebx
mov ebx, dword [ebp - 0x30]
jne 0x1004a920
cmp dword [ebp - 0x18], 0x20
jae 0x1004a9fa
push 0
push 8
lea ecx, [ebp - 0x28]
call fcn.10011238
jmp 0x1004a914
mov ebx, dword [ebp + 8]
jmp 0x1004a9fd
cmp eax, 3
jne 0x1004a9f4
push dword [ebx + 0x4c]
push dword [ebp - 0x34]
call fcn.10048b80
mov ebx, dword [ebp - 0x2c]
add esp, 8
mov edi, dword [ebp - 0x14]
test al, al
mov esi, dword [ebp - 0x28]
cmovne ebx, dword [ebp + 8]
jmp 0x1004a9fd
mov edi, dword [ebp - 0x14]
mov esi, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x2c]
cmp edi, 0x10
jb 0x1004aa44
lea eax, [edi + 1]
cmp eax, 0x1000
jb 0x1004aa3b
test byte [ebp - 0x28], 0x1f
je 0x1004aa17
call fcn.100906d1
mov eax, dword [esi - 4]
cmp eax, esi
jb 0x1004aa23
call fcn.100906d1
sub esi, eax
cmp esi, 4
jae 0x1004aa2f
call fcn.100906d1
cmp esi, 0x23
jbe 0x1004aa39
call fcn.100906d1
mov esi, eax
push esi
call fcn.1008a772
add esp, 4
mov eax, ebx
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 4