Function at 0x490170
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2074
call fcn.006b59e0
mov eax, dword [0x7e6410]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
xorps xmm0, xmm0
mov dword [ebp - 0x2034], eax
mov eax, dword [ebp + 0x14]
push ebx
shr eax, 0x10
mov ebx, ecx
push esi
and eax, 1
mov dword [ebp - 0x200c], 0
push edi
mov dword [ebp - 0x2038], eax
xor eax, eax
push 0x38
push eax
mov dword [ebp - 0x2014], eax
lea eax, [ebp - 0x2070]
push eax
mov dword [ebp - 0x201c], 0
movlpd qword [ebp - 0x2030], xmm0
call fcn.006b47d0
mov eax, dword [ebx]
add esp, 0xc
mov ecx, ebx
push dword [ebp + 0x3e]
call dword [eax + 0x44]
sub esp, 8
lea ecx, [ebp - 0x2070]
call fcn.004a9d30
mov edi, dword [ebp + 0x22]
lea ecx, [ebp - 0x1008]
mov dword [ebp - 0x2064], ecx
add esp, 8
mov ecx, dword [ebp - 0x202c]
xor eax, eax
mov dword [ebp - 0x2020], ecx
mov ecx, dword [ebp - 0x2030]
mov dword [ebp - 0x2018], edi
mov dword [ebp - 0x2010], eax
mov dword [ebp - 0x2060], 0x1000
mov dword [ebx + 0x14], eax
mov dword [ebp - 0x2024], ecx
lea ebx, [ebx]
cmp dword [ebp - 0x206c], 0
jne 0x4902be
test eax, eax
jl 0x4902be
jg 0x490253
test edi, edi
je 0x4902be
mov esi, 0x1000
test eax, eax
jg 0x49026c
jl 0x490262
cmp edi, esi
jae 0x49026c
mov esi, edi
test edi, edi
je 0x4903f7
mov eax, dword [ebx]
lea ecx, [ebp - 0x2008]
push 0
push esi
push ecx
mov ecx, ebx
call dword [eax + 0x3c]
test eax, eax
je 0x4903d5
cmp dword [ebp - 0x2038], 0
je 0x49029d
lea eax, [ebp - 0x2008]
mov ecx, ebx
push eax
push esi
call fcn.004900f0
sub edi, esi
mov dword [ebp - 0x206c], esi
lea eax, [ebp - 0x2008]
mov dword [ebp - 0x2018], edi
sbb dword [ebp - 0x2010], 0
mov dword [ebp - 0x2070], eax
mov esi, dword [ebp - 0x205c]
lea ecx, [ebp - 0x2070]
call fcn.004a9ec0
mov edi, dword [ebp - 0x205c]
lea edx, [ebp - 0x1008]
mov ecx, dword [ebp - 0x200c]
sub edi, esi
push edi
mov dword [ebp - 0x202c], eax
call fcn.004a9970
mov esi, dword [ebp - 0x2034]
add esp, 4
mov dword [ebp - 0x200c], eax
mov eax, dword [esi]
test eax, eax
jne 0x49031b
push dword [esi + 4]
lea eax, [ebp - 0x1008]
push edi
push 1
push eax
call fcn.006b5539
add esp, 0x10
jmp 0x49034e
cmp eax, 1
jne 0x49034b
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x490356
mov edx, dword [esi + 0x10]
lea eax, [edx + edi]
cmp eax, dword [esi + 0xc]
ja 0x49034b
push edi
lea eax, [ebp - 0x1008]
push eax
lea eax, [edx + ecx]
push eax
call fcn.006b3670
add esp, 0xc
add dword [esi + 0x10], edi
jmp 0x490356
or eax, 0xffffffff
cmp eax, edi
jne 0x4903f0
mov edx, dword [ebp - 0x2024]
lea eax, [ebp - 0x1008]
mov ecx, dword [ebp - 0x2020]
add edx, edi
mov dword [ebp - 0x2064], eax
mov eax, dword [ebx + 0x23c]
adc ecx, 0
mov dword [ebp - 0x2060], 0x1000
mov dword [ebp - 0x2024], edx
mov dword [ebp - 0x2020], ecx
test eax, eax
je 0x4903b5
lea esi, [ebp - 0x201c]
push esi
push dword [ebx + 0x240]
push 0
push dword [ebp + 0x26]
push ecx
push edx
call eax
add esp, 0x18
cmp dword [ebp - 0x201c], 0
jne 0x4903de
mov eax, dword [ebp - 0x202c]
cmp eax, 1
je 0x4903f7
test eax, eax
jne 0x4903e7
mov edi, dword [ebp - 0x2018]
mov eax, dword [ebp - 0x2010]
jmp 0x490240
mov dword [ebx + 0x14], 0x15
jmp 0x49041c
mov dword [ebx + 0x14], 0x17
jmp 0x4903f7
mov dword [ebx + 0x14], 0x16
jmp 0x49041c
mov dword [ebx + 0x14], 0x30
cmp dword [ebx + 0x14], 0
jne 0x49041c
mov eax, dword [ebp - 0x200c]
cmp dword [ebp + 0x1e], eax
jne 0x490415
mov eax, 1
mov dword [ebp - 0x2014], eax
jmp 0x49041e
mov dword [ebx + 0x14], 0x18
xor eax, eax
mov esi, dword [ebp - 0x2054]
test esi, esi
je 0x490453
mov edi, dword [ebp - 0x204c]
test edi, edi
je 0x490453
mov eax, dword [esi + 0x34]
mov ebx, dword [ebp - 0x2048]
test eax, eax
je 0x490446
push eax
push ebx
call edi
add esp, 8
push esi
push ebx
call edi
mov eax, dword [ebp - 0x2014]
add esp, 8
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006b3266
mov esp, ebp
pop ebp
ret 0x50