Function at 0x49a1a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x42cc
call fcn.004bcc80
mov eax, dword [0x5c30d8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x4248], eax
xor edi, edi
mov eax, dword [ebp + 0x14]
push 0x1f4
mov dword [ebp - 0x4268], ebx
mov dword [ebp - 0x4244], eax
call fcn.0050b382
mov ecx, ebx
mov dword [ebp - 0x4250], eax
add esp, 4
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x49a1f2
sub ecx, edx
mov dword [ebp - 0x424c], edi
sar ecx, 1
movzx eax, cx
push 0x560930
push esi
mov dword [ebp - 0x425c], eax
mov dword [ebp - 0x4230], 0x499f40
mov dword [ebp - 0x422c], 0x499f60
mov dword [ebp - 0x4270], 0x499f40
mov dword [ebp - 0x426c], 0x499f60
call fcn.0050b7be
add esp, 8
mov dword [ebp - 0x4274], eax
test eax, eax
jne 0x49a26f
call fcn.0050b36a
cmp dword [eax], edi
je 0x49a26f
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004bcc20
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x427c]
mov dword [ebp - 0x427c], 0x49a720
mov dword [ebp - 0x4278], 0x49a770
mov dword [ebp - 0x4228], 0x49a920
mov dword [ebp - 0x4224], 0x49a9f0
mov dword [ebp - 0x4220], 0x49a980
mov dword [ebp - 0x421c], 0x49a9d0
mov dword [ebp - 0x4218], eax
mov dword [ebp - 0x4210], edi
mov dword [ebp - 0x4214], edi
call fcn.0049ece0
lea eax, [ebp - 0x42cc]
push eax
call fcn.0049fcf0
lea eax, [ebp - 0x4270]
push eax
lea eax, [ebp - 0x4230]
push eax
lea eax, [ebp - 0x4228]
push eax
lea eax, [ebp - 0x42cc]
push eax
call fcn.0049c1d0
add esp, 0x14
test eax, eax
je 0x49a314
lea eax, [ebp - 0x4230]
push eax
lea eax, [ebp - 0x42cc]
push eax
call fcn.0049fc80
jmp 0x49a64d
mov edx, dword [ebp - 0x42b0]
xor ebx, ebx
mov dword [ebp - 0x4264], 0xffffffff
mov dword [ebp - 0x4240], edi
mov dword [ebp - 0x4260], edi
mov dword [ebp - 0x4258], ebx
test edx, edx
je 0x49a63a
mov eax, dword [ebp - 0x42bc]
add eax, 0x19
mov dword [ebp - 0x4234], eax
nop
mov esi, dword [ebp - 0x4248]
test esi, esi
je 0x49a3b3
lea ecx, [ebx + 1]
lea eax, [edx - 3]
cmp ecx, eax
jb 0x49a367
lea ecx, [edx - 3]
cmp dword [ebp - 0x4244], 0
je 0x49a3ac
movd xmm0, edx
mov eax, edx
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
mov esi, dword [ebp - 0x4244]
movd xmm1, ecx
addsd xmm0, qword [eax*8 + 0x5609a0]
cvtdq2pd xmm1, xmm1
divsd xmm1, xmm0
mulsd xmm1, qword [0x560998]
cvttsd2si eax, xmm1
mov dword [esi], eax
mov esi, dword [ebp - 0x4248]
push edx
push ecx
call esi
add esp, 8
mov eax, dword [ebp - 0x428c]
mov dword [ebp - 0x4254], 0
mov dword [ebp - 0x4238], 0
mov esi, dword [eax + ebx*4 + 4]
sub esi, dword [eax + ebx*4]
cmp esi, dword [ebp - 0x424c]
jbe 0x49a40c
push edi
call fcn.0050b37d
add esp, 4
mov dword [ebp - 0x424c], esi
add esi, esi
je 0x49a60a
push esi
call fcn.0050b382
mov edi, eax
add esp, 4
test edi, edi
je 0x49a63a
mov eax, dword [ebp - 0x428c]
mov edx, dword [eax + ebx*4 + 4]
mov ecx, dword [eax + ebx*4]
sub edx, ecx
test edi, edi
je 0x49a440
mov eax, dword [ebp - 0x4288]
lea esi, [eax + ecx*2]
test edx, edx
je 0x49a440
mov ecx, edi
sub esi, edi
nop word [eax + eax]
mov ax, word [esi + ecx]
lea ecx, [ecx + 2]
mov word [ecx - 2], ax
sub edx, 1
jne 0x49a430
mov eax, dword [ebp - 0x4234]
cmp byte [eax], 0
jne 0x49a49b
lea eax, [ebp - 0x4270]
push eax
lea eax, [ebp - 0x4230]
push eax
lea eax, [ebp - 0x4238]
push eax
lea eax, [ebp - 0x4254]
push eax
lea eax, [ebp - 0x4260]
push eax
lea eax, [ebp - 0x4240]
push eax
lea eax, [ebp - 0x4264]
push eax
push ebx
lea eax, [ebp - 0x4228]
push eax
lea eax, [ebp - 0x42cc]
push eax
call fcn.0049fa20
add esp, 0x28
test eax, eax
jne 0x49a63a
mov esi, dword [ebp - 0x4250]
push 0x1f4
push 0
push esi
call fcn.00507800
mov ecx, dword [ebp - 0x4268]
mov edx, esi
add esp, 0xc
sub edx, ecx
nop dword [eax + eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x49a4c0
xor edx, edx
cmp word [edi], dx
je 0x49a511
mov eax, dword [ebp - 0x425c]
lea ebx, [edx + 0x5c]
movzx eax, ax
mov ecx, edi
lea esi, [esi + eax*2]
cmp word [ecx], 0x2f
jne 0x49a4f1
mov word [ecx], bx
mov ax, word [ecx]
inc edx
mov word [esi], ax
add esi, 2
cmp word [edi + edx*2], 0
lea ecx, [edi + edx*2]
jne 0x49a4e8
mov ebx, dword [ebp - 0x4258]
mov esi, dword [ebp - 0x4250]
push esi
call fcn.00500c3a
mov eax, dword [ebp - 0x4234]
add esp, 4
cmp byte [eax], 0
jne 0x49a5ec
lea eax, [ebp - 0x423c]
push esi
push eax
call fcn.0049bfc0
add esp, 8
test eax, eax
je 0x49a5a4
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.00507800
lea edx, [ebp - 0x20c]
add esp, 0xc
mov ecx, esi
sub edx, esi
nop dword [eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x49a560
lea eax, [ebp - 0x20c]
push eax
call fcn.0050262a
lea eax, [ebp - 0x423c]
push esi
push eax
call fcn.0049bfc0
add esp, 0xc
test eax, eax
je 0x49a5a4
push str.can_not_open_output_file
push str._nERROR:__s_n
call fcn.004a0030
add esp, 8
jmp 0x49a5ec
mov eax, dword [ebp - 0x4238]
mov esi, dword [ebp - 0x423c]
test eax, eax
je 0x49a5d5
push esi
push eax
mov eax, dword [ebp - 0x4254]
add eax, dword [ebp - 0x4240]
push 1
push eax
call fcn.0050c4c0
add esp, 0x10
cmp eax, dword [ebp - 0x4238]
jne 0x49a60e
test esi, esi
je 0x49a5ec
push esi
call fcn.0050b54f
add esp, 4
test eax, eax
jne 0x49a628
mov dword [ebp - 0x423c], eax
add dword [ebp - 0x4234], 0x20
inc ebx
mov edx, dword [ebp - 0x42b0]
mov dword [ebp - 0x4258], ebx
cmp ebx, edx
jb 0x49a350
jmp 0x49a63a
xor edi, edi
jmp 0x49a63a
push esi
call fcn.0050b5fa
push str.can_not_write_output_file
push str._nERROR:__s_n
call fcn.004a0030
add esp, 0xc
jmp 0x49a63a
push str.can_not_close_output_file
push str._nERROR:__s_n
call fcn.004a0030
add esp, 8
push dword [ebp - 0x4240]
lea eax, [ebp - 0x4230]
push eax
call dword [ebp - 0x422c]
add esp, 8
lea eax, [ebp - 0x4230]
push dword [ebp - 0x429c]
push eax
call dword [ebp - 0x422c]
push dword [ebp - 0x4298]
lea eax, [ebp - 0x4230]
push eax
call dword [ebp - 0x422c]
push dword [ebp - 0x4294]
lea eax, [ebp - 0x4230]
push eax
call dword [ebp - 0x422c]
push dword [ebp - 0x4290]
lea eax, [ebp - 0x4230]
push eax
call dword [ebp - 0x422c]
push dword [ebp - 0x428c]
lea eax, [ebp - 0x4230]
push eax
call dword [ebp - 0x422c]
push dword [ebp - 0x4288]
lea eax, [ebp - 0x4230]
push eax
call dword [ebp - 0x422c]
lea eax, [ebp - 0x4230]
mov dword [ebp - 0x4288], 0
push eax
lea eax, [ebp - 0x42cc]
mov dword [ebp - 0x4284], 0
push eax
call fcn.0049fd60
push edi
call fcn.0050b37d
mov eax, dword [ebp - 0x4274]
add esp, 0x3c
test eax, eax
je 0x49a705
push eax
call fcn.0050b54f
add esp, 4
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004bcc20
mov esp, ebp
pop ebp
ret