Function at 0x1015a5b0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xa0
mov esi, esp
mov eax, dword [0x101db764]
mov edi, dword [ebp + 8]
xor eax, ebp
mov dword [esi + 0x98], eax
mov ecx, dword [edi + 0x920]
lea eax, [ecx + ecx + 3]
and eax, 0xfffffffc
call fcn.1015e8d0
mov eax, esp
and eax, 0xfffffff0
mov dword [esi + 0x50], eax
mov esp, eax
mov edx, dword [edi + 0x918]
add ecx, edx
shl ecx, 2
mov eax, ecx
call fcn.1015e8d0
mov eax, esp
and eax, 0xfffffff0
mov dword [esi + 0x4c], eax
mov esp, eax
mov ecx, dword [edi + 0x91c]
lea eax, [ecx*4]
call fcn.1015e8d0
mov eax, esp
and eax, 0xfffffff0
mov dword [esi + 0x54], eax
mov esp, eax
lea eax, [ecx*4 + 0x40]
call fcn.1015e8d0
mov eax, esp
and eax, 0xfffffff0
mov dword [esi + 0x18], eax
mov esp, eax
mov al, byte [edi + 0xacf]
test edx, edx
mov byte [esi + 0x2b], al
jle 0x1015a6e4
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x14]
mov ecx, eax
movsx ebx, byte [eax + 0xad2]
mov al, byte [eax + 0xacd]
movsx ecx, byte [ecx + 0xace]
sar al, 1
movsx eax, al
add ecx, ecx
movsx ecx, word [ecx + eax*4 + 0x101c2050]
mov eax, edx
xor edx, edx
shl ecx, 4
mov dword [esi + 0x10], ecx
jmp 0x1015a68b
or ebx, 0x500
jmp 0x1015a6b1
movsx eax, word [eax + edx*2]
mov ecx, dword [ebp + 8]
imul edi, ebx, 0xbb38435
add edi, 0x3619636b
mov ebx, eax
shl ebx, 0xe
test eax, eax
mov dword [ecx + edx*4 + 4], ebx
jle 0x1015a6ba
add ebx, 0xfffffb00
mov eax, dword [ebp + 8]
mov dword [eax + edx*4 + 4], ebx
jmp 0x1015a6bf
test ax, ax
js 0x1015a683
add ebx, dword [esi + 0x10]
mov ecx, dword [ebp + 8]
mov eax, ebx
neg eax
test edi, edi
cmovns eax, ebx
mov dword [ecx + edx*4 + 4], eax
mov eax, dword [ebp + 0x14]
movsx ebx, word [eax + edx*2]
inc edx
add ebx, edi
cmp edx, dword [ecx + 0x918]
jl 0x1015a68b
mov eax, dword [ebp + 8]
mov edi, eax
lea eax, [eax + 0x504]
push 0x40
mov dword [esi + 0x58], eax
push eax
push dword [esi + 0x18]
call fcn.101613e0
add esp, 0xc
cmp dword [edi + 0x914], 0
jle 0x1015b09e
mov eax, dword [edi + 0x920]
mov ecx, dword [ebp + 0x10]
mov ebx, edi
mov dword [esi + 0x34], eax
lea eax, [edi + 4]
xor edi, edi
mov dword [esi + 0x44], ecx
mov dword [esi + 0x38], eax
mov eax, dword [esi + 0x4c]
lea eax, [eax - 4]
mov dword [esi + 0x48], eax
mov eax, dword [esi + 0x50]
lea eax, [eax - 2]
mov dword [esi + 0x5c], eax
mov ecx, dword [ebp + 0xc]
mov eax, edi
shl eax, 4
and eax, 0xffffffe0
lea ecx, [ecx + eax + 0x20]
mov eax, dword [ebx + 0x924]
add eax, eax
push eax
mov dword [esi + 0x40], ecx
push ecx
lea eax, [esi + 0x78]
push eax
call fcn.101613e0
add esp, 0xc
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x24], edi
mov cl, byte [ebx + 0xacd]
mov edi, dword [eax + edi*4 + 0x10]
mov byte [esi + 0x14], cl
mov eax, edi
neg eax
cmovl eax, edi
test eax, eax
je 0x1015a786
bsr eax, eax
xor eax, 0x1f
jmp 0x1015a78b
mov eax, 0x20
lea ecx, [eax - 1]
mov dword [esi + 0x2c], edi
mov dword [esi + 0x10], eax
mov eax, 0x1fffffff
xor edx, edx
shl edi, cl
mov ebx, edi
movzx ecx, di
sar ebx, 0x10
idiv ebx
mov dword [esi + 0x1c], edi
movsx edx, ax
imul ecx, edx
imul ebx, edx
mov edi, edx
mov edx, eax
sar eax, 0xf
sar ecx, 0x10
inc eax
shl edx, 0x10
mov dword [esi + 0x20], edi
add ecx, ebx
sar eax, 1
shl ecx, 3
neg ecx
imul eax, ecx
add eax, edx
mov edx, ecx
movzx ecx, cx
sar edx, 0x10
imul ecx, edi
imul edx, edi
mov edi, dword [esi + 0x10]
sar ecx, 0x10
add eax, edx
mov edx, 0x3e
add eax, ecx
sub edx, edi
cmp edx, 0x2f
jg 0x1015a81c
mov ecx, 0x2f
mov ebx, 0x7fffffff
sub ecx, edx
mov edx, 0x80000000
sar edx, cl
shr ebx, cl
cmp edx, ebx
jle 0x1015a831
cmp eax, edx
mov edi, edx
jg 0x1015a83e
cmp eax, ebx
cmovl eax, ebx
jmp 0x1015a83c
lea ecx, [edx - 0x2f]
sar eax, cl
cmp edx, 0x4f
mov ecx, 0
cmovge eax, ecx
mov dword [esi + 0x30], eax
jmp 0x1015a843
cmp eax, ebx
mov edi, ebx
jg 0x1015a83e
cmp eax, edx
cmovl eax, edx
mov edi, eax
shl edi, cl
mov dword [esi + 0x30], edi
mov eax, dword [ebp + 8]
mov ecx, dword [esi + 0x24]
mov edx, dword [esi + 0x2c]
mov dword [esi + 0xc], 0x10000
mov ebx, dword [eax]
lea edi, [ecx + ecx*4]
cmp edx, ebx
je 0x1015a9fa
mov eax, ebx
mov dword [esi + 0x3c], edi
neg eax
cmovl eax, ebx
test eax, eax
je 0x1015a876
bsr eax, eax
xor eax, 0x1f
jmp 0x1015a87b
mov eax, 0x20
mov edi, dword [esi + 0x20]
lea ecx, [eax - 1]
mov dword [esi + 0xc], eax
shl ebx, cl
mov eax, ebx
movzx ecx, bx
sar eax, 0x10
imul ecx, edi
imul eax, edi
sar ecx, 0x10
add ecx, eax
mov eax, ecx
imul dword [esi + 0x1c]
shl edx, 3
sub ebx, edx
mov edx, ebx
movzx eax, bx
sar edx, 0x10
imul eax, edi
imul edx, edi
sar eax, 0x10
add edx, ecx
mov ecx, dword [esi + 0xc]
add edx, eax
xor eax, eax
inc eax
sub eax, dword [esi + 0x10]
lea eax, [eax + ecx + 0x1c]
cmp eax, 0xf
jg 0x1015a8f4
mov ecx, 0x10
mov edi, 0x80000000
mov ebx, 0x7fffffff
sub ecx, eax
sar edi, cl
shr ebx, cl
cmp edi, ebx
jle 0x1015a90c
mov eax, dword [esi + 0x18]
cmp edx, edi
mov dword [esi + 0xc], edi
jg 0x1015a91e
cmp edx, ebx
cmovl edx, ebx
jmp 0x1015a91b
lea ecx, [eax - 0x10]
mov edi, dword [esi + 0x3c]
sar edx, cl
cmp eax, 0x30
mov eax, 0
cmovge edx, eax
mov eax, dword [esi + 0x18]
jmp 0x1015a926
mov eax, dword [esi + 0x18]
cmp edx, ebx
mov dword [esi + 0xc], ebx
jg 0x1015a91e
cmp edx, edi
cmovl edx, edi
mov dword [esi + 0xc], edx
mov edx, dword [esi + 0xc]
mov edi, dword [esi + 0x3c]
shl edx, cl
mov ebx, edx
mov edx, ebx
movzx ecx, bx
movd xmm2, ebx
mov dword [esi + 0xc], ebx
sar edx, 0x10
movd xmm1, ecx
pshufd xmm2, xmm2, 0
mov ecx, 0xffffffc0
movd xmm0, edx
pshufd xmm1, xmm1, 0
pshufd xmm0, xmm0, 0
movdqa xmm3, xmmword [eax + ecx + 0x40]
pshufd xmm7, xmm0, 0xf5
movdqa xmm5, xmm3
psrad xmm3, 0xf
pslld xmm5, 0x10
psubd xmm3, xmmword [0x10191cd0]
psrad xmm5, 0x10
movdqa xmm4, xmm5
pshufd xmm6, xmm5, 0xf5
pmuludq xmm5, xmm1
pmuludq xmm4, xmm0
pmuludq xmm7, xmm6
pshufd xmm5, xmm5, 0xe8
pshufd xmm4, xmm4, 0xe8
pshufd xmm7, xmm7, 0xe8
psrad xmm3, 1
punpckldq xmm4, xmm7
pshufd xmm7, xmm1, 0xf5
pmuludq xmm7, xmm6
pshufd xmm6, xmm7, 0xe8
pshufd xmm7, xmm2, 0xf5
punpckldq xmm5, xmm6
pshufd xmm6, xmm3, 0xf5
pmuludq xmm3, xmm2
pmuludq xmm7, xmm6
pshufd xmm3, xmm3, 0xe8
psrad xmm5, 0x10
pshufd xmm6, xmm7, 0xe8
punpckldq xmm3, xmm6
paddd xmm3, xmm4
paddd xmm3, xmm5
movdqa xmmword [eax + ecx + 0x40], xmm3
add ecx, 0x10
jne 0x1015a953
mov eax, dword [ebp + 8]
mov edx, dword [esi + 0x2c]
mov ecx, dword [ebp + 0xc]
mov dword [eax], edx
mov ebx, eax
cmp dword [eax + 0x1040], 0
mov al, byte [esi + 0x14]
lea edi, [ecx + edi*2 + 0x60]
je 0x1015aa4b
cmp dword [ebx + 0x1044], 2
jne 0x1015aa4b
cmp dword [esi + 0x24], 1
ja 0x1015aa4b
cmp al, 2
je 0x1015aa4b
xor eax, eax
mov word [edi + 8], 0
mov ecx, dword [esi + 0x24]
mov dword [edi + 4], eax
mov dword [edi], eax
mov word [edi + 4], 0x1000
mov eax, dword [ebp + 0xc]
mov edx, dword [ebx + 0x904]
mov dword [esi + 0x1c], edx
mov dword [eax + ecx*4], edx
jmp 0x1015aa61
cmp al, 2
mov eax, dword [esi + 0x18]
mov ecx, dword [esi + 0x38]
jne 0x1015aaba
mov ecx, dword [esi + 0x24]
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + ecx*4]
mov dword [esi + 0x1c], eax
mov eax, ecx
test ecx, ecx
mov dword [esi + 0x10], edi
je 0x1015aac8
cmp byte [esi + 0x2b], 3
jg 0x1015ab23
cmp eax, 2
jne 0x1015ab23
mov edi, dword [ebx + 0x920]
mov eax, dword [ebx + 0x91c]
lea ecx, [ebx + edi*2 + 0x544]
sub edi, dword [esi + 0x1c]
shl eax, 2
sub edi, dword [ebx + 0x924]
push eax
push dword [ebp + 0x10]
push ecx
call fcn.101613e0
add esp, 0xc
mov eax, dword [ebx + 0x920]
mov ecx, dword [ebx + 0x924]
mov dword [esi + 0xc], ecx
jmp 0x1015aade
mov edi, dword [ebx + 0x91c]
mov dword [esi + 0x20], ecx
jmp 0x1015ad16
mov eax, dword [ebx + 0x920]
mov ecx, dword [ebx + 0x924]
mov edi, eax
mov dword [esi + 0xc], ecx
sub edi, dword [esi + 0x1c]
sub edi, ecx
lea edx, [edi - 2]
mov ecx, dword [esi + 0x24]
sub eax, edx
mov edx, dword [ebx + 0x91c]
imul edx, ecx
mov ecx, dword [esi + 0x50]
lea edx, [edx + edi - 2]
lea edx, [ebx + edx*2 + 0x544]
lea edi, [ecx + edi*2 - 4]
push dword [ebp + 0x18]
push dword [esi + 0xc]
push eax
push dword [esi + 0x40]
push edx
push edi
call fcn.1015dc7c
add esp, 0x18
cmp dword [esi + 0x24], 0
je 0x1015ab86
mov edx, dword [esi + 0x30]
jmp 0x1015aba9
mov ecx, dword [esi + 0xc]
cmp ecx, 0x10000
je 0x1015ac00
cmp dword [esi + 0x1c], 0xffffffff
jl 0x1015ac00
mov eax, ecx
mov dword [esi + 0xc], ecx
sar eax, 0x10
mov dword [esi + 0x14], eax
movzx eax, cx
mov ecx, dword [esi + 0x48]
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x1c]
lea edi, [eax + 2]
mov eax, dword [esi + 0x34]
lea ebx, [ecx + eax*4]
mov eax, dword [ebx]
movsx edx, ax
sar eax, 0xf
mov ecx, edx
imul edx, dword [esi + 0x20]
inc eax
sar eax, 1
imul ecx, dword [esi + 0x14]
imul eax, dword [esi + 0xc]
sar edx, 0x10
add edx, ecx
add eax, edx
mov dword [ebx], eax
add ebx, 0xfffffffc
dec edi
jne 0x1015ab5c
jmp 0x1015ac00
mov ecx, dword [ebp + 0xc]
mov edx, dword [esi + 0x30]
movsx ecx, word [ecx + 0x88]
mov eax, edx
movzx edx, dx
sar eax, 0x10
imul edx, ecx
imul eax, ecx
sar edx, 0x10
add edx, eax
shl edx, 2
cmp dword [esi + 0x1c], 0xffffffff
jl 0x1015ac00
mov eax, edx
movzx ecx, dx
mov edi, 0xfffffffe
sar eax, 0x10
mov dword [esi + 0x14], ecx
mov ecx, dword [esi + 0x5c]
sub edi, dword [esi + 0x1c]
mov dword [esi + 0xc], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x920]
lea eax, [ecx + eax*2]
mov ecx, dword [esi + 0x48]
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x34]
lea ebx, [ecx + eax*4]
xor eax, eax
mov ecx, dword [esi + 0x20]
mov edx, dword [esi + 0xc]
movsx ecx, word [ecx + eax*2]
imul edx, ecx
imul ecx, dword [esi + 0x14]
sar ecx, 0x10
add ecx, edx
mov dword [ebx + eax*4], ecx
dec eax
cmp edi, eax
jne 0x1015abe2
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x91c]
test eax, eax
jle 0x1015b05e
mov edi, eax
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x34]
mov dword [esi + 0x14], edi
lea edx, [ecx*4]
shl eax, 2
sub edx, eax
mov eax, dword [esi + 0x4c]
add edx, eax
lea eax, [eax + ecx*4]
xor ecx, ecx
mov dword [esi + 0xc], edx
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0xc]
mov ebx, dword [eax + ecx*4 + 8]
mov eax, dword [esi + 0x10]
movsx edi, word [eax]
mov eax, dword [esi + 0xc]
movzx edx, bx
sar ebx, 0x10
imul edx, edi
imul ebx, edi
mov edi, dword [eax + ecx*4 + 4]
mov eax, dword [esi + 0x10]
sar edx, 0x10
add edx, ebx
movsx eax, word [eax + 2]
movzx ebx, di
sar edi, 0x10
imul edi, eax
imul ebx, eax
mov eax, dword [esi + 0xc]
add edi, edx
sar ebx, 0x10
add ebx, edi
mov edi, dword [esi + 0x10]
mov eax, dword [eax + ecx*4]
movsx edi, word [edi + 4]
movzx edx, ax
sar eax, 0x10
imul eax, edi
imul edx, edi
add eax, ebx
sar edx, 0x10
mov ebx, dword [esi + 0x10]
add edx, eax
mov eax, dword [esi + 0xc]
movsx ebx, word [ebx + 6]
mov eax, dword [eax + ecx*4 - 4]
movzx edi, ax
sar eax, 0x10
imul eax, ebx
imul edi, ebx
mov ebx, dword [esi + 0x10]
add eax, edx
mov edx, dword [esi + 0xc]
sar edi, 0x10
add edi, eax
movsx ebx, word [ebx + 8]
mov edx, dword [edx + ecx*4 - 8]
mov eax, edx
movzx edx, dx
sar eax, 0x10
imul edx, ebx
imul eax, ebx
sar edx, 0x10
mov ebx, dword [esi + 0x20]
add eax, edi
add edx, eax
mov eax, dword [esi + 0x38]
mov eax, dword [eax + ecx*4]
lea edi, [eax + edx*2]
lea eax, [eax + edx*2 + 4]
mov edx, dword [esi + 0x54]
mov dword [edx + ecx*4], eax
lea eax, [edi + edi + 8]
mov edi, dword [esi + 0x14]
mov dword [ebx + ecx*4], eax
inc ecx
cmp ecx, edi
jl 0x1015ac38
mov eax, dword [esi + 0x54]
mov ebx, dword [ebp + 8]
mov edx, dword [esi + 0x2c]
add dword [esi + 0x34], ecx
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x18]
test edi, edi
jle 0x1015b065
mov eax, edx
sar edx, 0x15
inc edx
shr eax, 6
sar edx, 1
cwde
mov dword [esi + 0x2c], edx
xor edx, edx
mov dword [esi + 0x1c], eax
jmp 0x1015ad46
or eax, ecx
mov eax, 0x7fffffff
js 0x1015affa
jmp 0x1015affc
mov edi, dword [esi + 0x18]
mov eax, dword [ebx + 0x924]
mov dword [esi + 0x10], edx
mov ecx, dword [edi + edx*4 + 0x3c]
movsx edx, word [esi + 0x78]
mov dword [esi + 0xc], eax
sar eax, 1
mov ebx, ecx
sar ebx, 0x10
imul ebx, edx
add ebx, eax
movzx eax, cx
mov ecx, dword [esi + 0x10]
imul eax, edx
sar eax, 0x10
add eax, ebx
movsx ebx, word [esi + 0x7a]
mov edx, dword [edi + ecx*4 + 0x38]
mov ecx, dword [edi + ecx*4 + 0x34]
mov dword [esi + 0x14], edx
sar edx, 0x10
imul edx, ebx
add edx, eax
movzx eax, word [esi + 0x14]
imul eax, ebx
movsx ebx, word [esi + 0x7c]
sar eax, 0x10
add eax, edx
mov edx, ecx
sar edx, 0x10
imul edx, ebx
add edx, eax
movzx eax, cx
mov ecx, dword [esi + 0x10]
imul eax, ebx
movsx ebx, word [esi + 0x7e]
sar eax, 0x10
add eax, edx
mov edx, dword [edi + ecx*4 + 0x30]
mov edi, dword [edi + ecx*4 + 0x2c]
mov dword [esi + 0x14], edx
sar edx, 0x10
imul edx, ebx
add edx, eax
movzx eax, word [esi + 0x14]
imul eax, ebx
movsx ebx, word [esi + 0x80]
sar eax, 0x10
add eax, edx
mov edx, edi
sar edx, 0x10
imul edx, ebx
add edx, eax
movzx eax, di
mov edi, ecx
mov ecx, dword [esi + 0x18]
imul eax, ebx
movsx ebx, word [esi + 0x82]
sar eax, 0x10
add eax, edx
mov edx, dword [ecx + edi*4 + 0x28]
mov edi, dword [ecx + edi*4 + 0x24]
mov dword [esi + 0x14], edx
sar edx, 0x10
imul edx, ebx
add edx, eax
movzx eax, word [esi + 0x14]
imul eax, ebx
movsx ebx, word [esi + 0x84]
sar eax, 0x10
add eax, edx
mov edx, edi
sar edx, 0x10
imul edx, ebx
add edx, eax
movzx eax, di
mov edi, ecx
mov ecx, dword [esi + 0x10]
imul eax, ebx
movsx ebx, word [esi + 0x86]
sar eax, 0x10
add eax, edx
mov ecx, dword [edi + ecx*4 + 0x20]
mov edx, ecx
sar edx, 0x10
imul edx, ebx
add edx, eax
movzx eax, cx
mov ecx, dword [esi + 0x10]
imul eax, ebx
movsx ebx, word [esi + 0x88]
sar eax, 0x10
add eax, edx
mov edx, dword [edi + ecx*4 + 0x1c]
mov ecx, dword [edi + ecx*4 + 0x18]
movsx edi, word [esi + 0x8a]
mov dword [esi + 0x14], edx
sar edx, 0x10
imul edx, ebx
add edx, eax
movzx eax, word [esi + 0x14]
imul eax, ebx
sar eax, 0x10
add eax, edx
mov edx, ecx
sar edx, 0x10
imul edx, edi
add edx, eax
movzx eax, cx
mov ecx, 0x10
imul eax, edi
sar eax, 0x10
add eax, edx
cmp dword [esi + 0xc], ecx
jne 0x1015afc3
mov edx, dword [esi + 0x18]
mov ecx, dword [esi + 0x10]
mov edi, dword [edx + ecx*4 + 0x14]
movsx ecx, word [esi + 0x8c]
mov ebx, edx
movzx edx, di
sar edi, 0x10
imul edi, ecx
imul edx, ecx
mov ecx, ebx
mov ebx, dword [esi + 0x10]
mov dword [esi + 0x14], edx
add edi, eax
mov eax, dword [esi + 0x14]
mov ecx, dword [ecx + ebx*4 + 0x10]
sar eax, 0x10
add edi, eax
movzx edx, cx
mov dword [esi + 0xc], edx
mov edx, ecx
movsx ecx, word [esi + 0x8e]
sar edx, 0x10
imul edx, ecx
mov dword [esi + 0x40], edx
mov edx, dword [esi + 0xc]
add edi, dword [esi + 0x40]
imul edx, ecx
mov ecx, dword [esi + 0x18]
mov dword [esi + 0xc], edx
mov eax, dword [esi + 0xc]
mov ecx, dword [ecx + ebx*4 + 0xc]
sar eax, 0x10
add edi, eax
mov ebx, ecx
movzx edx, cx
movsx ecx, word [esi + 0x90]
sar ebx, 0x10
imul edx, ecx
imul ebx, ecx
mov ecx, dword [esi + 0x18]
mov dword [esi + 0x3c], edx
mov edx, dword [esi + 0x10]
mov dword [esi + 0x30], ebx
mov eax, dword [esi + 0x3c]
add edi, dword [esi + 0x30]
mov ebx, dword [ecx + edx*4 + 8]
movsx ecx, word [esi + 0x92]
sar eax, 0x10
add edi, eax
movzx edx, bx
sar ebx, 0x10
imul edx, ecx
imul ebx, ecx
mov ecx, dword [esi + 0x18]
mov dword [esi + 0x68], edx
mov edx, dword [esi + 0x10]
mov dword [esi + 0x6c], ebx
movsx ebx, word [esi + 0x94]
mov eax, dword [esi + 0x68]
add edi, dword [esi + 0x6c]
mov ecx, dword [ecx + edx*4 + 4]
sar eax, 0x10
add edi, eax
movzx edx, cx
sar ecx, 0x10
imul ecx, ebx
imul edx, ebx
movsx ebx, word [esi + 0x96]
mov dword [esi + 0x64], ecx
mov dword [esi + 0x60], edx
mov ecx, dword [esi + 0x18]
mov edx, dword [esi + 0x10]
mov eax, dword [esi + 0x60]
add edi, dword [esi + 0x64]
mov ecx, dword [ecx + edx*4]
sar eax, 0x10
add edi, eax
movzx edx, cx
sar ecx, 0x10
imul edx, ebx
imul ecx, ebx
add edi, ecx
sar edx, 0x10
add edi, edx
mov eax, edi
mov ecx, dword [esi + 0x20]
mov edx, dword [esi + 0x10]
cmp eax, 0xf7ffffff
mov ecx, dword [ecx + edx*4]
jg 0x1015afd8
mov eax, 0xf8000000
cmp eax, 0x8000000
jl 0x1015afe4
mov eax, 0x7ffffff
shl eax, 4
mov edi, eax
add edi, ecx
js 0x1015ad34
test eax, ecx
mov eax, 0x80000000
js 0x1015affc
mov eax, edi
mov ecx, dword [esi + 0x18]
mov edi, dword [esi + 0x1c]
mov ebx, edx
mov dword [ecx + edx*4 + 0x40], eax
mov ecx, eax
movzx edx, ax
imul eax, dword [esi + 0x2c]
sar ecx, 0x10
imul edx, edi
imul ecx, edi
sar edx, 0x10
add eax, ecx
mov ecx, 0x8000
add eax, edx
cmp eax, 0xff7fff80
jl 0x1015b035
mov ecx, eax
shr ecx, 7
inc ecx
shr ecx, 1
cmp eax, 0x7fff7f
mov eax, 0x7fff
jg 0x1015b043
mov eax, ecx
mov ecx, dword [esi + 0x44]
mov edx, ebx
inc edx
mov word [ecx + ebx*2], ax
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x91c]
cmp edx, eax
jl 0x1015ad46
mov edx, eax
mov eax, dword [esi + 0x18]
jmp 0x1015b069
mov ecx, edi
mov edx, edi
mov edi, edx
mov ecx, eax
lea eax, [eax + edx*4]
push 0x40
push eax
push ecx
call fcn.101613e0
add esp, 0xc
mov eax, dword [esi + 0x38]
lea eax, [eax + edi*4]
mov dword [esi + 0x38], eax
mov eax, dword [esi + 0x44]
lea eax, [eax + edi*2]
mov edi, dword [esi + 0x24]
mov dword [esi + 0x44], eax
inc edi
cmp edi, dword [ebx + 0x914]
jl 0x1015a738
push 0x40
push dword [esi + 0x18]
push dword [esi + 0x58]
call fcn.101613e0
add esp, 0xc
mov ecx, dword [esi + 0x98]
xor ecx, ebp
call fcn.1015e65c
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret