Function at 0x408700
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [0x4474b8]
push esi
push edi
mov dword [ebp - 8], ebx
mov eax, dword [ebx + 0x5108]
sub eax, 1
mov dword [ebp - 0x10], eax
js 0x40878e
lea edi, [eax + eax*4]
shl edi, 2
nop word [eax + eax]
mov ecx, dword [ebx + 0x5110]
cmp dword [ecx + edi + 4], 7
jne 0x408783
mov esi, ecx
mov eax, 0x66666667
sub ecx, esi
add ecx, edi
imul ecx
sar edx, 3
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
lea eax, [ecx + ecx*4]
lea edx, [esi + eax*4]
mov eax, dword [ebx + 0x5108]
sub eax, ecx
lea eax, [eax + eax*4]
lea eax, [eax*4 - 0x14]
push eax
lea eax, [edx + 0x14]
push eax
push edx
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [ebp - 0x10]
add esp, 0xc
dec dword [ebx + 0x5108]
dec eax
sub edi, 0x14
mov dword [ebp - 0x10], eax
test eax, eax
jns 0x408730
mov eax, dword [ebx + 0x5108]
mov esi, dword [ebx + 0x5110]
lea eax, [eax + eax*4]
lea edi, [esi + eax*4]
cmp esi, edi
je 0x4087bb
cmp dword [esi + 4], 0
jne 0x4087b4
mov eax, dword [esi + 0xc]
push esi
push ebx
call eax
add esp, 8
add esi, 0x14
cmp esi, edi
jne 0x4087a4
mov eax, dword [0x4474b8]
cmp dword [eax + 0x3898], 0
je 0x4087e5
mov ecx, dword [eax + 0x38a8]
test ecx, ecx
je 0x4087db
cmp ecx, 0x41a540
jne 0x4087e5
mov dword [eax + 0x38a8], 0x413bf0
cmp dword [eax + 0x389c], 0
je 0x40880a
mov ecx, dword [eax + 0x38ac]
test ecx, ecx
je 0x408800
cmp ecx, 0x41a620
jne 0x40880a
mov dword [eax + 0x38ac], 0x413c10
mov ecx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov esi, eax
mov dword [ebp - 0xc], 6
mov dword [ebp - 0x10], ecx
cmp byte [esi + 0x50d0], 0
jne 0x4088c9
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x4088c2
push ecx
lea eax, [ebp - 4]
mov dword [ebp - 4], 0
push eax
call fcn.00402940
mov edi, eax
add esp, 8
test edi, edi
je 0x4088bd
mov edx, dword [ebp - 4]
test edx, edx
je 0x40885c
mov ecx, edi
call fcn.00419c20
mov ecx, dword [0x4474b8]
test ecx, ecx
je 0x4088b6
movsx eax, word [ecx + 0x520c]
mov edx, dword [ecx + 0x3f70]
add eax, 0xa42
mov dword [ebp - 0x1c], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x4088ac
movsx eax, word [ecx + 0x520c]
inc eax
cdq
idiv dword [ebp - 0xc]
movzx eax, dx
mov edx, dword [ebp - 0x1c]
mov word [ecx + 0x520c], ax
cwde
add eax, 0xa42
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5208]
push edi
call dword [ebp - 0x10]
add esp, 4
mov eax, dword [0x4474b8]
mov byte [esi + 0x50d0], 1
movss xmm0, dword [esi + 0x50d4]
xorps xmm1, xmm1
comiss xmm0, xmm1
jbe 0x40894c
subss xmm0, dword [esi + 0x18]
comiss xmm1, xmm0
movss dword [esi + 0x50d4], xmm0
jb 0x40894c
mov edi, dword [esi + 0x20]
test edi, edi
je 0x40893b
lea ecx, [ebp - 4]
mov dword [eax + 0x50d4], 0
mov dword [ebp - 4], 0
call fcn.00419e30
mov edx, 0x43f3fc
mov dword [ebp - 0x1c], eax
mov ecx, edi
call fcn.004027c0
mov edi, eax
test edi, edi
je 0x408942
push edi
push dword [ebp - 4]
push 1
push dword [ebp - 0x1c]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x14
jmp 0x408942
mov byte [esi + 0x88], 1
mov dword [esi + 0x50d4], 0
movss xmm0, dword [ebx + 0x18]
xor eax, eax
inc dword [ebx + 0x3f70]
cvtps2pd xmm0, xmm0
mov byte [ebx + 0x3f7c], 1
mov word [ebx + 0x5034], ax
mov dword [ebx + 0x3ff4], eax
addsd xmm0, qword [ebx + 0x3f68]
movsd qword [ebx + 0x3f68], xmm0
mov ecx, dword [ebx + 0x5048]
test ecx, ecx
jns 0x4089a6
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
xor ecx, ecx
test eax, eax
cmovg ecx, eax
push ecx
lea ecx, [ebx + 0x5044]
call fcn.0041b8f0
mov dword [ebx + 0x5044], 0
mov ecx, 0x3c
mov eax, dword [ebx + 0x5330]
movss xmm1, dword [ebx + 0x18]
movaps xmm0, xmm1
subss xmm0, dword [ebx + eax*4 + 0x5240]
addss xmm0, dword [ebx + 0x5338]
movss dword [ebx + 0x5338], xmm0
movss dword [ebx + eax*4 + 0x5240], xmm1
mov eax, dword [ebx + 0x5330]
inc eax
movss xmm1, dword [ebx + 0x5338]
cdq
idiv ecx
mov eax, dword [ebx + 0x5334]
movss xmm0, dword [0x4442a0]
inc eax
cmp eax, ecx
mov dword [ebx + 0x5330], edx
movss dword [ebp - 4], xmm0
cmovl ecx, eax
comiss xmm1, dword [0x44417c]
mov dword [ebx + 0x5334], ecx
jbe 0x408a3c
movd xmm0, ecx
cvtdq2ps xmm0, xmm0
divss xmm1, xmm0
movss xmm0, dword [0x444204]
divss xmm0, xmm1
movss dword [ebx + 0x8c], xmm0
mov ecx, dword [ebx + 0x3fa8]
test ecx, ecx
jns 0x408a6a
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
xor ecx, ecx
test eax, eax
cmovg ecx, eax
push ecx
lea ecx, [ebx + 0x3fa4]
call fcn.0041c180
mov dword [ebx + 0x3fa4], 0
mov cl, byte [ebx + 0x47]
call fcn.00413290
mov esi, dword [0x4474b8]
mov eax, dword [esi + 0x4ad4]
mov edx, dword [eax]
mov dword [edx + 4], 5
mov dword [edx + 8], 0
mov dword [edx + 0xc], 0
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0x14]
mov dword [edx + 0x10], eax
mov dword [edx + 0x14], ecx
mov edi, dword [esi + 0x4ad4]
mov eax, dword [esi + 0x4acc]
lea eax, [edi + eax*4]
cmp edi, eax
je 0x408b91
mov ebx, eax
mov edx, dword [edi]
add edi, 4
mov eax, dword [edx + 0x9c]
mov ecx, dword [edx + 0xa0]
movss xmm0, dword [edx + 0xc]
mov dword [edx + 0x8c], eax
mov eax, dword [edx + 0xa4]
mov dword [edx + 0x90], ecx
mov ecx, dword [edx + 0xa8]
mov dword [edx + 0x94], eax
mov dword [edx + 0x98], ecx
mov dword [edx + 0xa4], 0
mov dword [edx + 0xa8], 0
mov dword [edx + 0x9c], 0
mov dword [edx + 0xa0], 0
movss xmm2, dword [edx + 0x8c]
movaps xmm1, xmm2
addss xmm0, dword [edx + 0x90]
addss xmm1, dword [edx + 8]
movss dword [edx + 0x1c], xmm0
movss xmm0, dword [edx + 0x10]
movss dword [edx + 0x18], xmm1
subss xmm0, xmm2
xorps xmm2, xmm2
xorps xmm1, xmm1
subss xmm0, dword [edx + 0x94]
maxss xmm2, xmm0
movss xmm0, dword [edx + 0x14]
subss xmm0, dword [edx + 0x90]
subss xmm0, dword [edx + 0x98]
movss dword [edx + 0x20], xmm2
maxss xmm1, xmm0
movss dword [edx + 0x24], xmm1
cmp edi, ebx
jne 0x408ac4
mov ebx, dword [ebp - 8]
mov eax, dword [ebx + 0x2c]
mov byte [eax + 0x10], 1
call fcn.004084f0
mov edi, dword [esi + 0x38]
test edi, edi
jne 0x408bac
mov eax, dword [esi + 0x2c]
mov eax, dword [eax + 0x44]
mov edi, dword [eax]
movss xmm1, dword [esi + 0x30]
movss xmm0, dword [0x444204]
mov ecx, dword [esi + 0x4004]
mov dword [esi + 0x3d4c], edi
mulss xmm1, dword [edi + 0x10]
mulss xmm1, dword [edi + 0x4c]
maxss xmm0, xmm1
movss dword [esi + 0x3d54], xmm0
test ecx, ecx
je 0x408c05
mov eax, dword [ecx]
movss xmm1, dword [ecx + 0x270]
mulss xmm1, dword [eax + 0x3d54]
mov eax, dword [ecx + 0x30c]
test eax, eax
je 0x408c08
mulss xmm1, dword [eax + 0x270]
jmp 0x408c08
xorps xmm1, xmm1
movss dword [esi + 0x3d50], xmm1
movaps xmm0, xmm1
divss xmm0, dword [edi + 0x10]
movss dword [esi + 0x3d58], xmm0
mov edx, dword [edi + 0x30]
mov eax, dword [edx + 0x34]
mov ecx, dword [edx + 0x38]
mov dword [esi + 0x3d60], eax
lea eax, [edx + 0x60]
mov dword [esi + 0x3d64], ecx
mov dword [esi + 0x3f60], eax
mov dword [esi + 0x3d68], edi
movss dword [esi + 0x3d6c], xmm1
movss dword [esi + 0x3d70], xmm0
mov ecx, dword [ebx + 0x4ad4]
mov eax, dword [ebx + 0x4acc]
lea edx, [ecx + eax*4]
cmp ecx, edx
je 0x408c74
mov eax, dword [ecx]
add ecx, 4
mov byte [eax + 0x40], 0
cmp ecx, edx
jne 0x408c67
cmp byte [ebx + 0x4cd4], 0
je 0x408ca8
mov eax, dword [ebx + 0x4cec]
cmp eax, dword [ebx + 0x4060]
jne 0x408ca8
cmp dword [esi + 0x4060], eax
jne 0x408c99
mov dword [esi + 0x4064], eax
cmp dword [esi + 0x4088], eax
jne 0x408ca8
mov byte [esi + 0x408c], 1
mov al, byte [ebx + 0x69]
test al, al
je 0x408cb8
cmp byte [ebx + 0xc8], 0
jne 0x408cc6
mov dword [ebx + 0x4040], 0
test al, al
je 0x408cdb
cmp dword [ebx + 0x4050], 1
jle 0x408cdb
mov eax, dword [ebx + 0x404c]
mov dword [ebx + 0x4040], eax
cmp dword [ebx + 0x404c], 0
jne 0x408cf0
mov dword [ebx + 0x4054], 0
jmp 0x408d02
mov eax, dword [ebx + 0x4048]
test eax, eax
je 0x408d0c
cmp dword [ebx + 0x4060], eax
jne 0x408d0c
mov dword [ebx + 0x4058], 0
mov eax, dword [ebx + 0x4048]
test eax, eax
je 0x408d46
movss xmm1, dword [ebx + 0x18]
movaps xmm0, xmm1
addss xmm0, dword [ebx + 0x4054]
movss dword [ebx + 0x4054], xmm0
cmp dword [ebx + 0x4060], eax
je 0x408d46
addss xmm1, dword [ebx + 0x4058]
movss dword [ebx + 0x4058], xmm1
mov dword [ebx + 0x404c], eax
mov eax, dword [ebx + 0x4060]
mov dword [ebx + 0x4050], 0
mov dword [ebx + 0x4048], 0
mov word [ebx + 0x405c], 0
test eax, eax
je 0x408da2
cmp dword [ebx + 0x4064], eax
je 0x408da2
cmp dword [ebx + 0x4088], eax
jne 0x408da2
test byte [ebx + 0x5180], 2
je 0x408d99
push str.NewFrame__:_ClearActiveID___because_it_isnt_marked_alive_anymore__n
call fcn.0041a7b0
add esp, 4
xor edx, edx
xor ecx, ecx
call fcn.004074c0
mov ecx, dword [ebx + 0x4060]
test ecx, ecx
je 0x408dc1
movss xmm0, dword [ebx + 0x18]
addss xmm0, dword [ebx + 0x4068]
movss dword [ebx + 0x4068], xmm0
mov eax, dword [ebx + 0x4080]
movss xmm0, dword [ebx + 0x18]
addss xmm0, dword [ebx + 0x4098]
mov dword [ebx + 0x4090], eax
mov al, byte [ebx + 0x4070]
mov byte [ebx + 0x408d], al
mov eax, dword [ebx + 0x4f94]
movss dword [ebx + 0x4098], xmm0
mov dword [ebx + 0x4088], ecx
mov dword [ebx + 0x4064], 0
mov byte [ebx + 0x4071], 0
mov byte [ebx + 0x408c], 0
mov byte [ebx + 0x406c], 0
test eax, eax
je 0x408e2b
cmp ecx, eax
je 0x408e2b
mov dword [ebx + 0x4f94], 0
test ecx, ecx
jne 0x408e3b
mov dword [ebx + 0x4950], ecx
mov byte [ebx + 0x4954], cl
mov ecx, dword [ebx + 0x4ea4]
test ecx, ecx
je 0x408e5e
movss xmm0, dword [ebx + 0x4ec0]
comiss xmm0, dword [ebx + 0x3d38]
jb 0x408e68
mov dword [ebx + 0x4eb4], ecx
jmp 0x408e68
mov dword [ebx + 0x4eb4], 0
mov eax, dword [ebx + 0x4008]
test eax, eax
je 0x408e8e
movss xmm0, dword [ebx + 0x4ec0]
comiss xmm0, dword [ebx + 0x3d38]
jb 0x408e98
mov eax, dword [eax + 8]
mov dword [ebx + 0x4eb8], eax
jmp 0x408e98
mov dword [ebx + 0x4eb8], 0
movss xmm0, dword [ebx + 0x4eac]
mov dword [ebx + 0x4ea8], ecx
test ecx, ecx
je 0x408ec3
addss xmm0, dword [ebx + 0x18]
mov dword [ebx + 0x4ea4], 0
movss dword [ebx + 0x4eac], xmm0
jmp 0x408f03
comiss xmm0, dword [0x44417c]
jbe 0x408f0d
movss xmm1, dword [ebx + 0x18]
movss xmm0, dword [0x4441b0]
movaps xmm2, xmm1
addss xmm2, dword [ebx + 0x4eb0]
addss xmm1, xmm1
movss dword [ebx + 0x4eb0], xmm2
maxss xmm0, xmm1
comiss xmm2, xmm0
jb 0x408f0d
mov dword [ebx + 0x4eac], 0
mov dword [ebx + 0x4eb0], 0
mov eax, dword [ebx + 0x4d48]
mov dword [ebx + 0x4d4c], eax
mov dword [ebx + 0x4d48], 0
mov dword [ebx + 0x4d44], 0x7f7fffff
mov word [ebx + 0x4cd5], 0
mov dword [ebx + 0x4d54], 0
call fcn.00411f80
call fcn.004166e0
call fcn.00412500
call fcn.00408240
mov esi, dword [0x4474b8]
mov ecx, dword [esi + 0x4014]
test ecx, ecx
je 0x40900c
mov eax, dword [esi + 0x4060]
mov dword [esi + 0x4064], eax
cmp dword [esi + 0x4088], eax
jne 0x408f83
mov byte [esi + 0x408c], 1
cmp byte [esi + 0xb4], 0
mov edi, dword [ecx + 0x314]
je 0x409000
lea eax, [esi + 0xac]
mov ecx, eax
test eax, eax
jne 0x408fa4
lea ecx, [esi + 0xac]
movss xmm0, dword [ecx]
movss xmm1, dword [0x4442bc]
comiss xmm0, xmm1
movss xmm2, dword [ecx + 4]
jb 0x409000
comiss xmm2, xmm1
jb 0x409000
movss xmm0, dword [eax]
lea edx, [ebp - 0x28]
subss xmm0, dword [esi + 0x4078]
push 1
mov ecx, edi
movss dword [ebp - 0x28], xmm0
movss xmm0, dword [eax + 4]
subss xmm0, dword [esi + 0x407c]
movss dword [ebp - 0x24], xmm0
call fcn.00411000
mov ecx, dword [esi + 0x4014]
add esp, 4
xor edx, edx
call fcn.00410ca0
jmp 0x409048
mov dword [esi + 0x4014], 0
jmp 0x40903f
mov ecx, dword [esi + 0x4080]
test ecx, ecx
je 0x409048
mov eax, dword [esi + 0x4060]
cmp dword [ecx + 0x7c], eax
jne 0x409048
mov dword [esi + 0x4064], eax
cmp dword [esi + 0x4088], eax
jne 0x409036
mov byte [esi + 0x408c], 1
cmp byte [esi + 0xb4], 0
jne 0x409048
xor edx, edx
xor ecx, ecx
call fcn.004074c0
mov eax, dword [0x4474b8]
movss xmm2, dword [0x444244]
mov edx, dword [eax + 0x4aa8]
sub edx, 1
js 0x409087
mov eax, dword [eax + 0x4ab0]
lea ecx, [edx + edx*4]
lea eax, [eax + ecx*8]
add eax, 4
nop
mov ecx, dword [eax]
test ecx, ecx
je 0x40907f
test dword [ecx + 0xc], 0x8000000
jne 0x4090a1
sub eax, 0x28
sub edx, 1
jns 0x409070
cmp dword [ebx + 0x4ca4], 0
je 0x4090bc
movss xmm0, dword [ebx + 0x4cb4]
comiss xmm0, dword [0x44417c]
jbe 0x4090bc
movss xmm1, dword [ebx + 0x18]
mulss xmm1, xmm2
addss xmm1, dword [ebx + 0x4cd0]
minss xmm1, dword [0x444204]
jmp 0x4090dd
movss xmm0, dword [ebx + 0x18]
mulss xmm0, dword [0x444250]
movss xmm1, dword [ebx + 0x4cd0]
subss xmm1, xmm0
maxss xmm1, dword [0x44417c]
movss dword [ebx + 0x4cd0], xmm1
movups xmm0, xmmword [ebx + 0x50b0]
mov dword [ebx + 0x4ebc], 0
mov dword [ebx + 0x5344], 0xffffffff
mov dword [ebx + 0x5340], 0xffffffff
mov dword [ebx + 0x533c], 0xffffffff
movups xmmword [ebx + 0x50c0], xmm0
mov byte [ebx + 0x50b0], 0
call fcn.00412890
cmp byte [ebx + 0x3f7f], 0
jne 0x409154
movss xmm1, dword [ebx + 0x50]
xorps xmm0, xmm0
comiss xmm0, xmm1
ja 0x409154
movsd xmm0, qword [ebx + 0x3f68]
cvtpd2ps xmm0, xmm0
subss xmm0, xmm1
movss dword [ebp - 4], xmm0
jmp 0x409159
movss xmm0, dword [ebp - 4]
mov edi, dword [ebx + 0x3fc0]
mov eax, dword [ebx + 0x3fb8]
lea eax, [edi + eax*4]
mov dword [ebp - 0x1c], eax
cmp edi, eax
je 0x409231
mov ebx, eax
nop word [eax + eax]
mov esi, dword [edi]
mov ax, word [esi + 0xc8]
mov cl, byte [esi + 0xba]
mov word [esi + 0xca], ax
xor eax, eax
mov byte [esi + 0xbb], cl
mov byte [esi + 0xba], 0
mov byte [esi + 0xbc], 0
mov word [esi + 0xc8], ax
test cl, cl
jne 0x40921e
cmp byte [esi + 0x370], al
jne 0x40921e
comiss xmm0, dword [esi + 0x250]
jbe 0x40921e
mov ecx, dword [esi + 0x278]
mov byte [esi + 0x370], 1
mov eax, dword [ecx + 0x10]
mov dword [esi + 0x368], eax
mov eax, dword [ecx + 0x1c]
lea ecx, [esi + 0xf4]
mov dword [esi + 0x36c], eax
call fcn.00401010
mov ecx, dword [esi + 0x278]
call fcn.00424730
lea ecx, [esi + 0x190]
call fcn.00401010
lea ecx, [esi + 0x1bc]
call fcn.00401010
lea ecx, [esi + 0x1c8]
call fcn.00401010
movss xmm0, dword [ebp - 4]
add edi, 4
cmp edi, ebx
jne 0x409180
mov ebx, dword [ebp - 8]
xor ecx, ecx
mov dword [ebp - 0x14], ecx
cmp dword [ebx + 0x4dbc], ecx
jle 0x409398
xor edi, edi
xorps xmm1, xmm1
xor edx, edx
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], edx
nop
mov eax, dword [ebx + 0x4dc4]
movss xmm0, dword [edx + eax]
comiss xmm0, xmm1
jb 0x409379
movss xmm2, dword [ebp - 4]
comiss xmm2, xmm0
jbe 0x409379
mov esi, dword [ebx + 0x4da4]
add esi, edi
mov edi, dword [0x4474b8]
mov dword [ebp - 0x24], edi
mov dword [esi + 0x1a8], 0
mov ecx, dword [esi + 0x1a4]
test ecx, ecx
je 0x409314
mov dword [esi + 0x1a0], 0
mov dword [esi + 0x19c], 0
test edi, edi
je 0x409303
movsx eax, word [edi + 0x520c]
mov edx, dword [edi + 0x3f70]
add eax, 0xa42
mov dword [ebp - 0x20], edx
cmp dword [edi + eax*8], edx
lea eax, [edi + eax*8]
je 0x4092f9
movsx eax, word [edi + 0x520c]
inc eax
cdq
idiv dword [ebp - 0xc]
movzx eax, dx
mov edx, dword [ebp - 0x20]
mov word [edi + 0x520c], ax
cwde
add eax, 0xa42
lea eax, [edi + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [edi + 0x5208]
push ecx
call dword [ebp - 0x10]
add esp, 4
mov dword [esi + 0x1a4], 0
lea ecx, [esi + 0x15c]
mov byte [esi + 0x1ed], 1
call fcn.00401010
xor edx, edx
mov byte [esi + 0x1fc], 1
cmp dword [esi + 0x40], edx
jle 0x409357
xor ecx, ecx
or edi, 0xffffffff
nop dword [eax]
mov eax, dword [esi + 0x10]
lea ecx, [ecx + 0x74]
inc edx
mov word [ecx + eax - 0x20], di
cmp edx, dword [esi + 0x40]
jl 0x409340
mov ebx, dword [ebp - 8]
mov edi, dword [ebp - 0x24]
sub esi, dword [edi + 0x4da4]
xorps xmm1, xmm1
mov eax, dword [edi + 0x4dc4]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x18]
sar esi, 9
mov dword [eax + esi*4], 0xbf800000
inc ecx
add edi, 0x200
add edx, 4
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], edx
cmp ecx, dword [ebx + 0x4dbc]
jl 0x409250
mov eax, dword [ebx + 0x4d90]
mov ecx, eax
mov esi, dword [ebx + 0x4d98]
shl ecx, 4
sub ecx, eax
lea edi, [esi + ecx*8]
cmp esi, edi
je 0x4093e2
xorps xmm1, xmm1
movss xmm0, dword [esi + 4]
comiss xmm0, xmm1
jb 0x4093db
movss xmm2, dword [ebp - 4]
comiss xmm2, xmm0
jbe 0x4093db
lea ecx, [esi + 0x20]
call fcn.00426fc0
mov dword [esi + 4], 0xbf800000
xorps xmm1, xmm1
add esi, 0x78
cmp esi, edi
jne 0x4093b5
cmp byte [ebx + 0x3f7f], 0
je 0x4094a7
mov esi, dword [0x4474b8]
lea ecx, [esi + 0x4a90]
call fcn.00401010
mov edi, dword [esi + 0x4aa4]
test edi, edi
je 0x40948d
mov ecx, dword [0x4474b8]
mov dword [esi + 0x4aa0], 0
mov dword [esi + 0x4a9c], 0
test ecx, ecx
je 0x40947c
movsx eax, word [ecx + 0x520c]
mov edx, dword [ecx + 0x3f70]
add eax, 0xa42
mov dword [ebp - 0x24], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x409472
movsx eax, word [ecx + 0x520c]
inc eax
cdq
idiv dword [ebp - 0xc]
movzx eax, dx
mov edx, dword [ebp - 0x24]
mov word [ecx + 0x520c], ax
cwde
add eax, 0xa42
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5208]
push edi
call dword [ebp - 0x10]
add esp, 4
mov dword [esi + 0x4aa4], 0
lea ecx, [esi + 0x4e78]
mov dword [esi + 0x4e74], 0
call fcn.0041b100
call fcn.0042f0e0
mov eax, dword [ebx + 0x4ad8]
mov byte [ebx + 0x3f7f], 0
test eax, eax
je 0x409512
cmp byte [eax + 0xbb], 0
jne 0x409512
mov eax, dword [0x4474b8]
mov edx, dword [eax + 0x3fc4]
sub edx, 1
js 0x409506
mov eax, dword [eax + 0x3fcc]
lea esi, [eax + edx*4]
nop word [eax + eax]
mov ecx, dword [esi]
test ecx, ecx
je 0x4094fe
cmp byte [ecx + 0xbb], 0
je 0x4094fe
mov eax, dword [ecx + 0xc]
and eax, 0x10200
cmp eax, 0x10200
jne 0x409508
sub esi, 4
sub edx, 1
jns 0x4094e0
xor ecx, ecx
mov edx, 1
call fcn.00410ca0
mov ecx, dword [ebx + 0x3fe0]
test ecx, ecx
jns 0x409538
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
xor ecx, ecx
test eax, eax
cmovg ecx, eax
push ecx
lea ecx, [ebx + 0x3fdc]
call fcn.0041c0c0
mov dword [ebx + 0x3fdc], 0
mov ecx, dword [ebx + 0x4ab8]
test ecx, ecx
jns 0x409568
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
xor ecx, ecx
test eax, eax
cmovg ecx, eax
push ecx
lea ecx, [ebx + 0x4ab4]
call fcn.0041bf20
lea esi, [ebx + 0x4a90]
mov dword [ebx + 0x4ab4], 0
mov ecx, dword [esi + 4]
test ecx, ecx
jns 0x409597
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
xor ecx, ecx
test eax, eax
cmovg ecx, eax
push ecx
mov ecx, esi
call fcn.0041b8f0
mov dword [esi], 0
cmp dword [esi + 4], 0
jne 0x4095ac
push 8
mov ecx, esi
call fcn.0041b8f0
mov ecx, dword [esi]
mov eax, dword [esi + 8]
push 0
mov dword [eax + ecx*4], 0x10
inc dword [esi]
mov ecx, dword [esi]
mov eax, dword [ebx + 0x4a98]
mov eax, dword [eax + ecx*4 - 4]
lea ecx, [ebx + 0x4a9c]
mov dword [ebx + 0x4960], eax
call fcn.0041b5b0
call fcn.0041ab60
mov edx, dword [0x4474b8]
mov esi, edx
mov dword [esi + 0x4044], 0
mov eax, dword [esi + 0x51e4]
inc eax
cmp dword [esi + 0x3f70], eax
jne 0x4096ee
mov edi, dword [esi + 0x404c]
test edi, edi
jne 0x409613
mov edi, dword [esi + 0x4060]
cmp dword [esi + 0x51ec], edi
je 0x409666
lea eax, [esi + 0x51f0]
mov dword [esi + 0x51ec], edi
mov dword [esi + 0x51e8], 0xffffffff
mov ecx, dword [eax + 4]
test ecx, ecx
jns 0x409660
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
xor ecx, ecx
test eax, eax
cmovg ecx, eax
push ecx
lea ecx, [esi + 0x51f0]
call fcn.0041c260
mov edx, dword [0x4474b8]
lea eax, [esi + 0x51f0]
mov dword [eax], 0
test edi, edi
je 0x4096ee
mov eax, dword [esi + 0x51e8]
test eax, eax
js 0x4096b7
mov ecx, eax
cmp eax, dword [esi + 0x51f0]
jge 0x4096ca
mov ebx, dword [esi + 0x51f8]
lea ecx, [eax + eax*8]
cmp byte [ebx + ecx*8 + 5], 0
mov ebx, dword [ebp - 8]
jne 0x4096b0
mov edx, dword [esi + 0x51f8]
lea ebx, [eax + eax*8]
mov ecx, eax
cmp byte [edx + ebx*8 + 4], 2
mov ebx, dword [ebp - 8]
mov edx, dword [0x4474b8]
jle 0x4096ca
inc eax
mov dword [esi + 0x51e8], eax
mov ecx, eax
cmp eax, 0xffffffff
jne 0x4096c6
mov dword [esi + 0x4044], edi
jmp 0x4096ee
test ecx, ecx
js 0x4096ee
cmp ecx, dword [esi + 0x51f0]
jge 0x4096ee
mov eax, dword [esi + 0x51f8]
lea ecx, [ecx + ecx*8]
mov eax, dword [eax + ecx*8]
mov dword [esi + 0x4044], eax
mov eax, dword [esi + 0x51f8]
inc byte [eax + ecx*8 + 4]
movss xmm1, dword [edx + 0x51b4]
xorps xmm0, xmm0
comiss xmm0, xmm1
jae 0x4097b1
mov ecx, dword [edx + 0x4a5c]
mulss xmm1, dword [0x444244]
shl ecx, 4
cvtps2pd xmm0, xmm1
lea eax, [ecx + 0x39c0]
add eax, edx
lea esi, [ecx + edx]
push eax
lea edi, [ecx + edx]
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_cos_precise
movss xmm1, dword [0x4441cc]
lea edx, [esi + 0x39bc]
cvtsd2ss xmm0, xmm0
lea ecx, [edi + 0x39b8]
movaps xmm2, xmm1
mulss xmm0, xmm1
addss xmm0, xmm1
call fcn.00402c90
mov edx, dword [0x4474b8]
xorps xmm1, xmm1
add esp, 4
mov eax, dword [edx + 0x4a5c]
add eax, eax
mov dword [edx + eax*8 + 0x39c4], 0x3f800000
movss xmm0, dword [edx + 0x51b4]
subss xmm0, dword [edx + 0x18]
comiss xmm1, xmm0
movss dword [edx + 0x51b4], xmm0
jb 0x4097b1
mov eax, dword [edx + 0x4a5c]
cmp eax, 0x38
je 0x4097a7
movups xmm0, xmmword [edx + 0x51b8]
add eax, eax
movups xmmword [edx + eax*8 + 0x39b8], xmm0
mov dword [edx + 0x4a5c], 0x38
mov al, byte [ebx + 0x51a5]
test al, al
je 0x4097d6
sub al, 1
mov byte [ebx + 0x51a5], al
jne 0x4097d6
mov dword [ebx + 0x4964], 0
mov byte [ebx + 0x51a6], 0
mov al, byte [ebx + 0x51a4]
test al, al
je 0x40980f
sub al, 1
mov byte [ebx + 0x51a4], al
jne 0x40980f
push str._Debug_Log:_Auto_disabled_some_ImGuiDebugLogFlags_after_2_frames__n
call fcn.0041a7b0
mov eax, dword [ebx + 0x51a0]
add esp, 4
not eax
mov dword [ebx + 0x51a0], 0
and dword [ebx + 0x5180], eax
mov eax, dword [0x4474b8]
xor edx, edx
mov byte [ebx + 0x3f7d], 1
mov ecx, str.DebugDefault
push 0
or dword [eax + 0x49f0], 2
mov dword [eax + 0x4a10], 0x43c80000
mov dword [eax + 0x4a14], 0x43c80000
mov dword [eax + 0x49f8], 4
call fcn.0040dcc0
add esp, 4
cmp byte [ebx + 0x6b], 0
je 0x40988c
mov cl, byte [ebx + 0x51ac]
cmp cl, 0xff
jne 0x409866
xor edx, edx
jmp 0x40988f
mov eax, dword [ebx + 0x3f70]
and eax, 0x80000003
jns 0x409878
dec eax
or eax, 0xfffffffc
inc eax
neg eax
movsx ecx, cl
sbb eax, eax
inc eax
add eax, ecx
mov ecx, 0xa
cdq
idiv ecx
jmp 0x40988f
or dl, 0xff
mov byte [ebx + 0x51ac], dl
mov eax, dword [ebx + 0x5108]
mov esi, dword [ebx + 0x5110]
lea eax, [eax + eax*4]
lea edi, [esi + eax*4]
cmp esi, edi
je 0x4098c7
nop dword [eax + eax]
cmp dword [esi + 4], 1
jne 0x4098c0
mov eax, dword [esi + 0xc]
push esi
push ebx
call eax
add esp, 8
add esi, 0x14
cmp esi, edi
jne 0x4098b0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret