Function at 0x457f30
Capabilities:
Create thread

Disassembly:
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 4]
mov edx, dword [esp + 0x14]
mov dword [0x5a6a58], eax
mov eax, dword [esp + 0x18]
mov dword [0x5a6ab4], eax
mov dword [0x5a6ab0], edx
mov edx, dword [esp + 0x20]
mov dword [0x5a6aa0], ecx
mov ecx, dword [esp + 0x1c]
mov dword [0x5a6aac], edx
mov dword [0x5a6aa8], ecx
mov ecx, dword [esp + 8]
mov eax, dword [ecx + 8]
cdq
sub eax, edx
sub esp, 0x30
push ebx
mov ebx, eax
push ebp
push esi
mov esi, dword [esp + 0x4c]
push edi
mov edi, dword [ecx]
sar ebx, 1
add ebx, edi
mov dword [0x5a6a5c], ebx
mov eax, dword [ecx + 0xc]
mov ebp, dword [ecx + 4]
cdq
sub eax, edx
sar eax, 1
add eax, ebp
mov dword [0x5a6a60], eax
mov eax, dword [esi + 8]
cdq
sub eax, edx
mov edi, eax
mov eax, dword [esi]
sar edi, 1
add edi, eax
mov dword [0x5a6a80], edi
mov eax, dword [esi + 0xc]
cdq
sub eax, edx
mov edx, dword [esi + 4]
mov ebp, eax
sar ebp, 1
add ebp, edx
mov dword [0x5a6a68], ebp
mov eax, dword [ecx]
test eax, eax
mov dword [0x5a6a70], eax
mov edx, dword [ecx + 4]
mov dword [0x5a6a74], edx
mov edx, dword [ecx + 8]
mov dword [0x5a6a78], edx
mov ecx, dword [ecx + 0xc]
mov dword [0x5a6a7c], ecx
jge 0x458007
mov ecx, edx
add ecx, eax
mov dword [0x5a6a70], 0
mov eax, dword [0x5a6a70]
mov dword [0x5a6a78], ecx
mov ecx, dword [0x5a6a74]
test ecx, ecx
jge 0x458021
add dword [0x5a6a7c], ecx
mov dword [0x5a6a74], 0
mov edx, dword [esp + 0x44]
mov ecx, dword [edx]
mov edx, dword [0x5a6a78]
add edx, eax
cmp edx, ecx
jle 0x45803b
sub ecx, eax
mov dword [0x5a6a78], ecx
mov eax, dword [esp + 0x44]
mov ecx, dword [0x5a6a74]
mov edx, dword [0x5a6a7c]
mov eax, dword [eax + 4]
add edx, ecx
cmp edx, eax
jle 0x45805b
sub eax, ecx
mov dword [0x5a6a7c], eax
mov eax, dword [0x5a6a78]
test eax, eax
jle 0x4583fe
mov eax, dword [0x5a6a7c]
test eax, eax
jle 0x4583fe
mov eax, dword [esi]
test eax, eax
mov dword [0x5a6a88], eax
mov ecx, dword [esi + 4]
mov dword [0x5a6a8c], ecx
mov edx, dword [esi + 8]
mov dword [0x5a6a90], edx
mov esi, dword [esi + 0xc]
mov dword [0x5a6a94], esi
jge 0x4580b2
add edx, eax
mov dword [0x5a6a88], 0
mov eax, dword [0x5a6a88]
mov dword [0x5a6a90], edx
test ecx, ecx
jge 0x4580c8
add esi, ecx
mov dword [0x5a6a94], esi
mov dword [0x5a6a8c], 0
mov ecx, dword [esp + 0x4c]
mov ecx, dword [ecx]
add edx, eax
cmp edx, ecx
jle 0x4580dc
sub ecx, eax
mov dword [0x5a6a90], ecx
mov edx, dword [esp + 0x4c]
mov eax, dword [edx + 4]
mov ecx, dword [0x5a6a8c]
lea edx, [esi + ecx]
cmp edx, eax
jle 0x4580fa
sub eax, ecx
mov esi, eax
mov dword [0x5a6a94], esi
mov eax, dword [0x5a6a90]
test eax, eax
jle 0x4583fe
test esi, esi
jle 0x4583fe
fld qword [0x497530]
fdiv qword [esp + 0x54]
call fcn.0045c0c0
mov ecx, eax
sub edi, dword [0x5a6a88]
imul edi, ecx
mov eax, ecx
cdq
shl ebx, 0xe
sub eax, edx
sub ebx, edi
mov edi, dword [0x5a6a70]
sar eax, 1
mov edx, edi
lea eax, [ebx + eax - 0x2000]
shl edx, 0xe
cmp eax, edx
mov dword [0x5a6a98], ecx
mov dword [0x5a6a64], eax
jge 0x45817c
inc dword [0x5a6a88]
mov ebx, dword [0x5a6a90]
dec ebx
add eax, ecx
test ebx, ebx
mov dword [0x5a6a90], ebx
jle 0x4583e0
cmp eax, edx
jl 0x458156
mov dword [0x5a6a64], eax
mov ebx, dword [0x5a6a78]
mov edx, dword [0x5a6a90]
add ebx, edi
shl ebx, 0xe
lea edi, [ebx - 0x4000]
dec edx
mov ebx, edx
imul ebx, ecx
add ebx, eax
cmp ebx, edi
jl 0x4581b9
test edx, edx
mov dword [0x5a6a90], edx
jle 0x4583fe
dec edx
mov ebx, edx
imul ebx, ecx
add ebx, eax
cmp ebx, edi
jge 0x45819f
fld qword [0x497530]
fdiv qword [esp + 0x5c]
call fcn.0045c0c0
mov edi, dword [0x5a6a8c]
mov ecx, eax
mov eax, dword [0x5a6a60]
shl eax, 0xe
sub ebp, edi
mov ebx, eax
imul ebp, ecx
mov eax, ecx
cdq
sub eax, edx
sub ebx, ebp
sar eax, 1
lea eax, [ebx + eax - 0x2000]
mov ebx, dword [0x5a6a74]
mov edx, ebx
shl edx, 0xe
cmp eax, edx
mov dword [0x5a6a9c], ecx
mov dword [0x5a6a6c], eax
jge 0x45822a
inc edi
dec esi
add eax, ecx
test esi, esi
jle 0x4583ed
cmp eax, edx
jl 0x458209
mov dword [0x5a6a6c], eax
mov dword [0x5a6a94], esi
mov dword [0x5a6a8c], edi
mov ebp, dword [0x5a6a7c]
lea edi, [ebx + ebp]
lea edx, [esi - 1]
mov ebx, edx
imul ebx, ecx
shl edi, 0xe
add edi, 0xffffc000
add ebx, eax
cmp ebx, edi
jl 0x458268
mov esi, edx
test esi, esi
mov dword [0x5a6a94], esi
jle 0x4583fe
lea edx, [esi - 1]
mov ebx, edx
imul ebx, ecx
add ebx, eax
cmp ebx, edi
jge 0x45824a
cmp ebp, 0x64
jl 0x4583c2
call fcn.00456320
cmp eax, 4
jl 0x458326
mov esi, dword [0x5a6a94]
mov ebp, dword [0x497218]
mov eax, esi
cdq
and edx, 3
add eax, edx
sar eax, 2
lea ecx, [eax + eax]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
lea eax, [eax + eax*2]
mov dword [esp + 0x3c], esi
mov dword [esp + 0x20], 0
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
lea edi, [esp + 0x10]
lea esi, [esp + 0x20]
mov ebx, 4
push 0
push 0
push esi
push fcn.00458410
push 0
push 0
call fcn.0045d3b4
add esp, 0x18
push 1
push eax
mov dword [edi], eax
call ebp
add esi, 8
add edi, 4
dec ebx
jne 0x4582cd
push 0xffffffffffffffff
push 1
lea eax, [esp + 0x18]
push eax
push 4
call dword [0x49721c]
mov ebx, dword [0x497140]
lea esi, [esp + 0x10]
mov edi, 4
mov ecx, dword [esi]
push ecx
call ebx
add esi, 4
dec edi
jne 0x458313
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret
cmp eax, 2
jl 0x4583bc
mov ecx, dword [0x5a6a94]
mov ebp, dword [0x497218]
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
lea edi, [esp + 0x10]
lea esi, [esp + 0x20]
mov ebx, 2
push 0
push 0
push esi
push fcn.00458410
push 0
push 0
call fcn.0045d3b4
add esp, 0x18
push 1
push eax
mov dword [edi], eax
call ebp
add esi, 8
add edi, 4
dec ebx
jne 0x458363
push 0xffffffffffffffff
push 1
lea edx, [esp + 0x18]
push edx
push 2
call dword [0x49721c]
mov ebx, dword [0x497140]
lea esi, [esp + 0x10]
mov edi, 2
mov eax, dword [esi]
push eax
call ebx
add esi, 4
dec edi
jne 0x4583a9
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret
mov esi, dword [0x5a6a94]
lea ecx, [esp + 0x20]
push ecx
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], esi
call fcn.00458410
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret
pop edi
pop esi
pop ebp
mov dword [0x5a6a64], eax
pop ebx
add esp, 0x30
ret
mov dword [0x5a6a6c], eax
mov dword [0x5a6a94], esi
mov dword [0x5a6a8c], edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret