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

Disassembly:
sub esp, 0x18
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_MulDiv]
push ebp
push esi
mov esi, dword [esp + 0x28]
mov eax, dword [esi + 0x500]
push edi
mov edi, dword [esp + 0x30]
push eax
push 0x5a0
push edi
call ebx
mov ecx, dword [esi + 0x504]
mov edx, dword [esp + 0x34]
push ecx
push 0x5a0
mov ebp, eax
push edx
mov dword [esp + 0x20], ebp
call ebx
mov ecx, dword [esi + 0x585c]
mov dword [esp + 0x2c], eax
mov eax, dword [esi + 0x5860]
imul eax, eax, 0xf0
add eax, ecx
mov ecx, dword [eax + 8]
cmp ecx, 5
jne 0x523fed
cmp dword [eax + 4], 0
je 0x523f50
push esi
call fcn.00522060
add esp, 4
mov edx, dword [esi + 0x5d8]
mov eax, dword [esi + 0x138]
mov ecx, dword [eax + edx*4]
test byte [ecx + 0x3c], 0x20
je 0x523f67
neg ebp
cmp dword [esi + 0x4b48], 0
je 0x523fca
test dword [esi + 0xa16c], 0x1000000
je 0x523fca
mov edx, dword [esi + 0x5860]
mov eax, dword [esi + 0x585c]
imul edx, edx, 0xf0
mov eax, dword [edx + eax + 0xc]
mov ecx, dword [esi + 0x2b38]
imul eax, eax, 0x58
add ecx, eax
mov eax, dword [ecx + 0xc]
add eax, ebp
jns 0x523fa6
xor eax, eax
mov edx, dword [ecx + 0x14]
push 0
sub edx, ebp
push edx
push 0xffffffffffffffff
push eax
mov eax, dword [esi + 0x39c]
push eax
call fcn.004c5fe0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret
mov edx, dword [esi + 0x39c]
push 0
mov ecx, ebp
neg ecx
push ecx
push 0
push ebp
push edx
call fcn.004c63e0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret
cmp ecx, 6
jne 0x52409c
cmp dword [eax + 4], 0
je 0x524005
push esi
call fcn.00522060
add esp, 4
mov eax, dword [esi + 0x5d8]
mov ecx, dword [esi + 0x138]
mov edx, dword [ecx + eax*4]
test byte [edx + 0x3c], 0x20
je 0x52401c
neg ebp
cmp dword [esi + 0x4b48], 0
je 0x52407a
test dword [esi + 0xa16c], 0x1000000
je 0x52407a
mov eax, dword [esi + 0x5860]
mov ecx, dword [esi + 0x585c]
imul eax, eax, 0xf0
mov edx, dword [eax + ecx + 0xc]
mov eax, dword [esi + 0x2b38]
imul edx, edx, 0x58
mov eax, dword [edx + eax + 0x10]
sub eax, ebp
jns 0x52405a
xor eax, eax
mov ecx, dword [esi + 0x39c]
push 0
push 0xffffffffffffffff
push eax
push 0xffffffffffffffff
push ecx
call fcn.004c5fe0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret
mov edx, dword [esi + 0x39c]
push 0
push 0
neg ebp
push ebp
push 0
push edx
call fcn.004c63e0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret
cmp ecx, 7
jne 0x52414d
cmp dword [eax + 4], 0
je 0x5240b4
push esi
call fcn.00522060
add esp, 4
mov eax, dword [esi + 0x5d8]
mov ecx, dword [esi + 0x138]
mov edx, dword [ecx + eax*4]
test byte [edx + 0x3c], 0x20
je 0x5240cb
neg ebp
cmp dword [esi + 0x4b48], 0
je 0x52412d
test dword [esi + 0xa16c], 0x1000000
je 0x52412d
mov eax, dword [esi + 0x5860]
mov ecx, dword [esi + 0x585c]
imul eax, eax, 0xf0
mov eax, dword [eax + ecx + 0xc]
mov edx, dword [esi + 0x2b38]
imul eax, eax, 0x58
lea ecx, [edx + eax]
mov eax, dword [ecx + 0x14]
add eax, ebp
jns 0x52410b
xor eax, eax
push 0
push eax
mov eax, dword [ecx + 0xc]
mov ecx, dword [esi + 0x39c]
push 0xffffffffffffffff
push eax
push ecx
call fcn.004c5fe0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret
mov edx, dword [esi + 0x39c]
push 0
push ebp
push 0
push 0
push edx
call fcn.004c63e0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret
cmp ecx, 8
jne 0x5242c3
cmp dword [eax + 4], 0
je 0x52416a
mov eax, dword [esp + 0x3c]
push eax
push esi
call fcn.00522190
add esp, 8
mov ecx, dword [esi + 0x5860]
mov edx, dword [esi + 0x585c]
imul ecx, ecx, 0xf0
cmp dword [esi + 0x39b0], 0
mov edi, dword [ecx + edx + 0xc]
je 0x5241a4
mov eax, dword [esi + 0x39a4]
mov ecx, dword [esi + 0x3894]
imul eax, eax, 0x10c
mov eax, dword [eax + ecx + 0x98]
jmp 0x5241ed
cmp dword [esi + 0x4b48], 0
je 0x5241ce
mov edx, dword [esi + 0x4b40]
mov eax, dword [esi + 0x138]
mov ecx, dword [eax + edx*4]
mov edx, dword [ecx + 0x14]
mov eax, dword [esi + 0x2b38]
imul edx, edx, 0x58
mov eax, dword [edx + eax + 0x1c]
jmp 0x5241ed
mov ecx, dword [esi + 0x5d8]
mov edx, dword [esi + 0x138]
mov eax, dword [edx + ecx*4]
mov ecx, dword [eax + 0x14]
mov edx, dword [esi + 0x2b38]
imul ecx, ecx, 0x58
mov eax, dword [ecx + edx + 0x1c]
mov ecx, dword [esi + 0x5d8]
mov edx, dword [esi + 0x138]
mov ecx, dword [edx + ecx*4]
test byte [ecx + 0x3c], 0x20
je 0x524204
neg ebp
mov ecx, dword [esi + 0x387c]
mov edx, eax
imul edx, edx, 0xb8
add edx, ecx
cmp edi, dword [edx]
jge 0x524c4b
mov dl, byte [edx + edi + 0xa4]
imul eax, eax, 0x2e
lea ebx, [eax + edi]
mov edi, dword [ecx + ebx*4 + 4]
mov eax, dword [ecx + ebx*4 + 0x54]
add edi, ebp
cmp dword [esi + 0xa114], 0
mov byte [esp + 0x2c], dl
mov dword [esp + 0x20], eax
je 0x52425e
test byte [esi + 0xa15c], 2
je 0x524251
push 0x47
jmp 0x524253
push 0x5a
push edi
call fcn.004e08e0
mov edi, eax
add esp, 8
mov ecx, dword [esi + 0x387c]
mov edx, dword [ecx + ebx*4 + 4]
mov eax, dword [esi + 0x39c]
push 0
push edx
push eax
call fcn.004c6ed0
test edi, edi
jle 0x524c4b
mov ecx, dword [esp + 0x3c]
cmp ecx, dword [esi + 0x42c]
jl 0x524c4b
mov edx, ecx
cmp edx, dword [esi + 0x434]
jge 0x524c4b
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x20]
mov edx, dword [esi + 0x39c]
push 0
push eax
push edi
push ecx
push edx
call fcn.004c6ad0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret
cmp ecx, 0xc
jne 0x524354
cmp dword [eax + 4], 0
je 0x5242db
push esi
call fcn.00522340
add esp, 4
mov eax, dword [esi + 0x5860]
mov ecx, dword [esi + 0x585c]
imul eax, eax, 0xf0
mov edi, dword [eax + ecx + 0xc]
push 0x34
push edi
push 0xffffffffffffffff
push edi
push 0xffffffffffffffff
push esi
call fcn.004fa650
imul edi, edi, 0x84
mov edx, dword [esi + 0x588c]
mov edi, dword [edx + edi + 4]
mov eax, dword [esi + 0x5884]
imul edi, edi, 0x68
add eax, edi
add esp, 0x18
cmp dword [eax + 0x4c], 0
jl 0x524348
mov ecx, dword [esi + 0x514]
mov edx, dword [eax + 0x14]
push ecx
push 0x5a0
push edx
call ebx
add eax, dword [esp + 0x2c]
mov ecx, dword [esi + 0x5884]
mov dword [edi + ecx + 0x4c], eax
jmp 0x5247f2
mov edx, dword [esp + 0x2c]
sub dword [eax + 0x4c], edx
jmp 0x5247f2
cmp ecx, 0xa
jne 0x5245d3
mov ecx, dword [esi + 0xa168]
and ecx, 0x8000000
cmp dword [eax + 4], 0
mov dword [esp + 0x18], ecx
je 0x52437c
push esi
call fcn.00522270
add esp, 4
mov eax, dword [esi + 0x5860]
mov ecx, dword [esi + 0x585c]
imul eax, eax, 0xf0
mov edi, dword [eax + ecx + 0x10]
mov ebp, dword [eax + ecx + 0xc]
mov ebx, dword [eax + ecx + 0x14]
add eax, ecx
cmp edi, 0xffffffff
jne 0x5243a3
mov edi, ebp
cmp ebx, 0xffffffff
jne 0x5243aa
mov ebx, ebp
push 0x34
push ebx
push 0xffffffffffffffff
push edi
push 0xffffffffffffffff
push esi
call fcn.004fa650
imul ebx, ebx, 0x84
imul edi, edi, 0x84
mov eax, dword [esi + 0x588c]
mov edx, dword [ebx + eax + 4]
mov edi, dword [edi + eax + 4]
push ebp
push esi
mov dword [esp + 0x44], edx
call fcn.00514620
mov ebp, eax
add esp, 0x20
mov dword [esp + 0x20], ebp
mov dword [esp + 0x10], edi
lea ebx, [ebx]
mov ebx, dword [esp + 0x10]
mov eax, dword [esi + 0x5884]
imul ebx, ebx, 0x68
mov edi, dword [ebx + eax + 8]
push edi
push esi
mov dword [esp + 0x24], ebx
call fcn.00514620
sub eax, ebp
cdq
xor eax, edx
sub eax, edx
add esp, 8
cmp eax, 0x3c
jl 0x52444f
jmp 0x524420
mov ecx, dword [esi + 0x588c]
imul edi, edi, 0x84
mov edi, dword [edi + ecx + 8]
cmp edi, 0xffffffff
je 0x5245a9
push edi
push esi
call fcn.00514620
sub eax, ebp
cdq
xor eax, edx
sub eax, edx
add esp, 8
cmp eax, 0x3c
jge 0x524420
mov edx, dword [esi + 0x5884]
test dword [ebx + edx + 0x24], 0x10000
mov ecx, dword [esp + 0x14]
je 0x524465
neg ecx
mov eax, dword [esi + 0x588c]
imul edi, edi, 0x84
mov edx, dword [edi + eax + 8]
mov ebx, dword [edi + eax + 0x14]
mov dword [esp + 0x2c], edx
lea edx, [edi + eax + 0x14]
lea ebp, [ebx + ecx]
cmp ebp, 0xb4
jl 0x5245a1
cmp dword [esp + 0x2c], 0
jle 0x5244ba
cmp dword [esp + 0x18], 0
jne 0x5244ba
mov ebp, dword [esp + 0x2c]
imul ebp, ebp, 0x84
mov ebp, dword [eax + ebp + 0x14]
sub ebp, ecx
cmp ebp, 0xb4
jl 0x5245a1
cmp dword [esi + 0xa114], 0
je 0x5244f6
mov eax, dword [edi + eax + 0x10]
add eax, ebx
add eax, ecx
test byte [esi + 0xa15c], 2
je 0x5244d8
push 0x47
jmp 0x5244da
push 0x5a
push eax
call fcn.004e08e0
mov ecx, dword [esi + 0x588c]
sub eax, dword [ecx + edi + 0x10]
add ecx, edi
lea edx, [ecx + 0x14]
add esp, 8
sub eax, dword [edx]
mov ecx, eax
add dword [edx], ecx
cmp dword [esi + 0x648], 0
je 0x524534
mov edx, dword [esi + 0x588c]
lea eax, [edi + edx]
mov edx, dword [eax + 0x14]
mov dword [eax + 0x50], edx
mov eax, dword [esi + 0x588c]
and dword [edi + eax + 0x40], 0xfffffdff
mov edx, dword [esi + 0x588c]
or dword [edi + edx + 0x40], 0x100
lea eax, [edi + eax + 0x40]
lea edi, [edi + edx + 0x40]
mov eax, dword [esp + 0x2c]
test eax, eax
jle 0x5245a1
cmp dword [esp + 0x18], 0
jne 0x5245a1
mov edx, dword [esi + 0x588c]
imul eax, eax, 0x84
sub dword [eax + edx + 0x14], ecx
lea edx, [eax + edx + 0x14]
mov edx, dword [esi + 0x588c]
add dword [eax + edx + 0x10], ecx
cmp dword [esi + 0x648], 0
lea edx, [eax + edx + 0x10]
je 0x5245a1
mov ecx, dword [esi + 0x588c]
mov edx, dword [ecx + eax + 0x14]
add ecx, eax
mov dword [ecx + 0x50], edx
mov ecx, dword [esi + 0x588c]
and dword [eax + ecx + 0x40], 0xfffffdff
mov edx, dword [esi + 0x588c]
or dword [eax + edx + 0x40], 0x100
lea ecx, [eax + ecx + 0x40]
lea eax, [eax + edx + 0x40]
mov ebp, dword [esp + 0x20]
mov ebx, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x24]
je 0x5247f2
mov ecx, dword [esi + 0x5884]
mov ebx, dword [ebx + ecx + 0x1c]
cmp ebx, 0xffffffff
mov dword [esp + 0x10], ebx
jne 0x5243f0
jmp 0x5247f2
cmp ecx, 0xb
jne 0x524812
cmp dword [eax + 4], 0
je 0x5245eb
push esi
call fcn.00522270
add esp, 4
mov edx, dword [esi + 0x5860]
mov eax, dword [esi + 0x585c]
imul edx, edx, 0xf0
mov edi, dword [eax + edx + 0x10]
mov ecx, dword [eax + edx + 0xc]
add eax, edx
cmp edi, 0xffffffff
mov eax, dword [eax + 0x14]
jne 0x524611
mov edi, ecx
cmp eax, 0xffffffff
jne 0x524618
mov eax, ecx
mov ecx, dword [esi + 0x5884]
imul eax, eax, 0x68
mov edx, dword [eax + ecx + 8]
mov eax, edi
imul eax, eax, 0x68
mov ecx, dword [eax + ecx + 8]
push 0x34
push edx
push 0xffffffffffffffff
push ecx
push 0xffffffffffffffff
push esi
call fcn.004fa650
add esp, 0x18
test edi, edi
mov ebx, edi
jle 0x5247f2
mov ecx, ebp
jmp 0x524654
mov ecx, dword [esp + 0x14]
cmp dword [esi + 0xa114], 0
mov eax, ecx
mov dword [esp + 0x2c], eax
je 0x5246ab
mov edx, dword [esi + 0x5884]
mov edi, ebx
imul edi, edi, 0x68
mov eax, dword [edx + edi + 0x20]
add eax, ecx
test byte [esi + 0xa15c], 2
je 0x524681
push 0x47
jmp 0x524683
push 0x5a
push eax
call fcn.004e08e0
mov ecx, dword [esi + 0x5884]
sub eax, dword [edi + ecx + 0x20]
add edi, ecx
add esp, 8
test dword [edi + 0x24], 0x10000
mov dword [esp + 0x2c], eax
je 0x5246ab
neg eax
mov dword [esp + 0x2c], eax
mov edx, dword [esi + 0x5884]
mov ecx, ebx
imul ecx, ecx, 0x68
lea edi, [edx + ecx]
mov dword [esp + 0x1c], ecx
mov ecx, dword [edi + 0x20]
add ecx, eax
js 0x5247dc
mov eax, dword [edi + 8]
xor ecx, ecx
xor edx, edx
test eax, eax
mov dword [esp + 0x20], ecx
jle 0x5246fa
mov ebx, dword [esi + 0x588c]
lea ecx, [ecx]
imul eax, eax, 0x84
add ecx, dword [eax + ebx + 0x14]
add eax, ebx
mov eax, dword [eax + 8]
add edx, 1
test eax, eax
jg 0x5246e0
mov dword [esp + 0x20], ecx
mov eax, dword [esp + 0x2c]
imul edx, edx, 0xb4
sub ecx, edx
cmp eax, ecx
jl 0x52471a
mov eax, ecx
test eax, eax
mov dword [esp + 0x2c], eax
jge 0x52471a
xor eax, eax
mov dword [esp + 0x2c], eax
add dword [edi + 0x20], eax
mov edx, dword [esi + 0x5884]
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + edx + 8]
mov ebx, dword [eax + edx + 0x20]
add eax, edx
test ecx, ecx
jle 0x5247dc
lea esp, [esp]
mov edx, dword [esi + 0x588c]
imul ecx, ecx, 0x84
mov dword [edx + ecx + 0x10], ebx
mov eax, dword [esi + 0x588c]
mov edi, dword [eax + ecx + 0x14]
lea ebp, [eax + ecx + 0x14]
mov eax, dword [esp + 0x2c]
imul eax, edi
cdq
idiv dword [esp + 0x20]
sub edi, eax
mov dword [ebp], edi
mov edx, dword [esi + 0x588c]
cmp dword [edx + ecx + 0x14], 0xb4
lea eax, [edx + ecx + 0x14]
jge 0x524789
mov dword [eax], 0xb4
cmp dword [esi + 0x648], 0
je 0x5247c5
mov eax, dword [esi + 0x588c]
mov edx, dword [eax + ecx + 0x14]
add eax, ecx
mov dword [eax + 0x50], edx
mov eax, dword [esi + 0x588c]
and dword [eax + ecx + 0x40], 0xfffffdff
mov edx, dword [esi + 0x588c]
or dword [edx + ecx + 0x40], 0x100
lea eax, [eax + ecx + 0x40]
lea eax, [edx + ecx + 0x40]
mov eax, dword [esi + 0x588c]
add ebx, dword [ecx + eax + 0x14]
add ecx, eax
mov ecx, dword [ecx + 8]
test ecx, ecx
jg 0x524740
mov ecx, dword [esi + 0x5884]
mov edx, dword [esp + 0x1c]
mov ebx, dword [ecx + edx + 0x1c]
test ebx, ebx
jg 0x524650
push 1
push esi
call fcn.00503a90
push 1
push esi
call fcn.00525730
add esp, 0x10
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret
cmp ecx, 2
jne 0x5249fd
cmp dword [esi + 0x5878], 0
mov ebp, dword [eax + 0xc]
je 0x524830
push esi
call fcn.00521f90
add esp, 4
mov eax, dword [esi + 0x5d8]
push 1
push eax
push esi
call fcn.004bb530
mov edx, dword [esi + 0x72c]
or dword [esi + 0xa17c], 0x10000
mov ecx, ebp
imul ecx, ecx, 0x98
add esp, 0xc
test dword [ecx + edx + 0x28], 0x100
je 0x52488a
mov eax, dword [esp + 0x34]
push eax
push edi
push esi
call fcn.005216d0
add esp, 0xc
and dword [esi + 0xa17c], 0xfffeffff
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret
mov eax, dword [esi + 0x5864]
test eax, eax
je 0x524919
cmp eax, 2
je 0x524919
push 0x32
push 0
push 0
push 0
push ebp
push esi
call fcn.004fa650
xor edi, edi
add esp, 0x18
cmp dword [esi + 0xa9c], edi
jle 0x5248f1
xor ebx, ebx
nop
mov ecx, dword [esi + 0xa98]
cmp dword [ebx + ecx + 0x60], 0
je 0x5248e3
xor edx, edx
cmp dword [esi + 0xa154], edx
setne dl
push edx
push edi
push esi
call fcn.004fff70
add esp, 0xc
add edi, 1
add ebx, 0x78
cmp edi, dword [esi + 0xa9c]
jl 0x5248c0
push 1
push 0
push 1
push 0
push esi
call fcn.0052b8f0
add esp, 0x14
and dword [esi + 0xa17c], 0xfffeffff
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret
mov ecx, dword [esi + 0x5860]
mov eax, dword [esi + 0x500]
imul ecx, ecx, 0xf0
mov edx, dword [esi + 0x585c]
push eax
mov eax, dword [ecx + edx + 0x4c]
push 0x5a0
push eax
call ebx
mov ecx, dword [esi + 0x5860]
mov edx, dword [esi + 0x585c]
imul ecx, ecx, 0xf0
mov ebp, eax
mov eax, dword [ecx + edx + 0x50]
mov ecx, dword [esi + 0x528]
cmp eax, ecx
jle 0x524962
sub eax, ecx
mov ecx, dword [esi + 0x504]
push ecx
push 0x5a0
push eax
call ebx
cmp dword [esi + 0x654], 0
mov edi, eax
je 0x5249bd
mov edx, dword [esi + 0x514]
mov eax, dword [esi + 0x568]
push edx
push 0x5a0
push eax
call ebx
sub edi, eax
cmp dword [esi + 0x654], 0
je 0x5249bd
mov ecx, dword [esi + 0x510]
mov edx, dword [esi + 0x39f8]
push ecx
push 0x5a0
push edx
push esi
call fcn.004bba00
add esp, 8
push eax
call ebx
sub ebp, eax
mov eax, dword [esi + 0x5860]
mov ecx, dword [esi + 0x585c]
imul eax, eax, 0xf0
mov edx, dword [eax + ecx + 0xc]
mov eax, dword [esi + 0x39c]
push 0xffffffffffffffff
push 0xffffffffffffffff
push edi
push ebp
push edx
push eax
call sym.LectoraViewer.exe__TerMoveParaFrame_24
and dword [esi + 0xa17c], 0xfffeffff
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret
cmp ecx, 1
jne 0x524ab9
mov eax, dword [eax + 0xc]
mov ecx, dword [esi + 0x3434]
mov edi, eax
imul edi, edi, 0x170
mov ebx, dword [ecx + edi + 0xc4]
or dword [esi + 0xa17c], 0x10000
test ebx, ebx
jle 0x524a37
push 0x32
push 0
push 0
push 0
push ebx
jmp 0x524a40
push 0x33
push 0
push 0
push 0
push eax
push esi
call fcn.004fa650
mov edx, dword [esi + 0x3434]
and dword [esi + 0xa17c], 0xfffeffff
or dword [edx + edi + 0x150], 0x1000
lea eax, [edx + edi + 0x150]
mov eax, dword [esi + 0x5d8]
add esp, 0x18
cmp eax, dword [esi + 0x3a00]
jge 0x524a7f
mov dword [esi + 0x3a00], eax
mov eax, dword [esi + 0x3434]
cmp dword [eax + edi + 0xc0], 0
je 0x524c4b
test ebx, ebx
jle 0x524c4b
push 1
push 0
push 1
push 0
push esi
call fcn.0052b8f0
add esp, 0x14
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret
cmp ecx, 3
jne 0x524c4b
cmp dword [esi + 0x5878], 0
je 0x524ad4
push esi
call fcn.00521f90
add esp, 4
mov ecx, dword [esi + 0x5860]
mov edx, dword [esi + 0x585c]
imul ecx, ecx, 0xf0
mov edi, dword [ecx + edx + 0xc]
lea eax, [ecx + edx]
imul edi, edi, 0x98
mov ecx, dword [esi + 0x72c]
lea edx, [ecx + edi]
mov ecx, dword [edx + 0x48]
test ecx, ecx
jle 0x524b23
mov edx, dword [esp + 0x2c]
mov eax, dword [esi + 0x39c]
push edx
push ebp
push ecx
push eax
call fcn.004be120
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret
test dword [edx + 0x28], 0x100
je 0x524b7d
mov ecx, dword [esi + 0x500]
mov edx, dword [eax + 0x18]
push ecx
push 0x5a0
push edx
call ebx
mov ebp, eax
mov eax, dword [esi + 0x72c]
cmp dword [eax + edi + 0x30], 2
jne 0x524b65
mov ecx, dword [esi + 0x5860]
mov edx, dword [esi + 0x585c]
imul ecx, ecx, 0xf0
mov eax, dword [ecx + edx + 0x24]
jmp 0x524ba7
mov eax, dword [esi + 0x5860]
mov ecx, dword [esi + 0x585c]
imul eax, eax, 0xf0
mov eax, dword [eax + ecx + 0x1c]
jmp 0x524ba7
mov edx, dword [esi + 0x500]
mov eax, dword [eax + 0x4c]
push edx
push 0x5a0
push eax
call ebx
mov ecx, dword [esi + 0x5860]
mov edx, dword [esi + 0x585c]
imul ecx, ecx, 0xf0
mov ebp, eax
mov eax, dword [ecx + edx + 0x50]
mov ecx, dword [esi + 0x530]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esi + 0x528]
cmp eax, ecx
jle 0x524bc2
sub eax, ecx
add dword [esp + 0x2c], 1
mov edx, dword [esi + 0x504]
push edx
push 0x5a0
push eax
call ebx
cmp dword [esi + 0x654], 0
mov edi, eax
je 0x524c1d
mov eax, dword [esi + 0x514]
mov ecx, dword [esi + 0x568]
push eax
push 0x5a0
push ecx
call ebx
sub edi, eax
cmp dword [esi + 0x654], 0
je 0x524c1d
mov edx, dword [esi + 0x510]
mov eax, dword [esi + 0x39f8]
push edx
push 0x5a0
push eax
push esi
call fcn.004bba00
add esp, 8
push eax
call ebx
sub ebp, eax
mov edx, dword [esi + 0x5860]
mov ecx, dword [esp + 0x2c]
imul edx, edx, 0xf0
mov eax, dword [esi + 0x585c]
push ecx
mov ecx, dword [edx + eax + 0xc]
mov edx, dword [esi + 0x39c]
push 0xffffffffffffffff
push 0xffffffffffffffff
push edi
push ebp
push ecx
push edx
call fcn.004bebd0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret