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

Disassembly:
sub esp, 0x98
push ebx
mov ebx, dword [esp + 0xac]
cmp ebx, 0xa
jae 0x50b5a8
push 0xffffffffffffffec
pop eax
jmp 0x50c840
mov eax, dword [esp + 0xa4]
push ebp
mov ebp, dword [esp + 0xa4]
add eax, ebp
push esi
mov esi, dword [esp + 0xb0]
mov dword [esp + 0x78], eax
add eax, 0xfffffffd
push edi
push esi
mov dword [esp + 0x84], eax
call fcn.0050d5e3
movzx edi, ax
lea eax, [esi + 2]
push eax
mov dword [esp + 0x94], edi
call fcn.0050d5e3
movzx eax, ax
mov dword [esp + 0x24], eax
lea eax, [esi + 4]
push eax
call fcn.0050d5e3
movzx ecx, ax
lea eax, [esi + 6]
push dword [esp + 0xc8]
mov dword [esp + 0xa0], eax
sub ebx, ecx
sub ebx, dword [esp + 0x2c]
add eax, edi
mov dword [esp + 0xac], eax
sub ebx, edi
add eax, dword [esp + 0x2c]
sub ebx, 6
mov dword [esp + 0xa8], eax
mov eax, dword [esp + 0xc0]
add eax, 3
mov dword [esp + 0xa4], ecx
shr eax, 2
mov dword [esp + 0x20], ebx
lea ecx, [eax + ebp]
lea edx, [ecx + eax]
mov dword [esp + 0x30], ecx
add eax, edx
mov dword [esp + 0x94], edx
mov ebx, ecx
mov dword [esp + 0x24], eax
mov edi, edx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x98], edi
mov dword [esp + 0x88], eax
call fcn.0050659e
shr eax, 0x10
add esp, 0x10
movzx esi, al
mov eax, dword [esp + 0xb8]
mov dword [esp + 0x18], esi
cmp dword [esp + 0x10], eax
ja 0x50b9da
mov ecx, dword [esp + 0x14]
cmp ecx, dword [esp + 0x7c]
ja 0x50b9da
cmp dword [esp + 0xb0], 6
jb 0x50b9da
push dword [esp + 0x8c]
lea eax, [esp + 0x68]
push dword [esp + 0x94]
push eax
call fcn.00509bf6
add esp, 0xc
cmp eax, 0xffffff88
ja 0x50c83d
push dword [esp + 0x1c]
lea eax, [esp + 0x54]
push dword [esp + 0xa0]
push eax
call fcn.00509bf6
add esp, 0xc
cmp eax, 0xffffff88
ja 0x50c83d
push dword [esp + 0x94]
lea eax, [esp + 0x40]
push dword [esp + 0x9c]
push eax
call fcn.00509bf6
add esp, 0xc
cmp eax, 0xffffff88
ja 0x50c83d
push dword [esp + 0x10]
mov eax, dword [esp + 0x98]
add eax, dword [esp + 0x9c]
push eax
lea eax, [esp + 0x30]
push eax
call fcn.00509bf6
add esp, 0xc
cmp eax, 0xffffff88
ja 0x50c83d
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x14]
sub eax, ecx
cmp eax, 4
jb 0x50b9c5
cmp ecx, dword [esp + 0x80]
jae 0x50b9c5
mov edx, esi
neg edx
and edx, 0x1f
mov dword [esp + 0x10], edx
mov ecx, dword [esp + 0x68]
mov eax, dword [esp + 0x64]
and ecx, 0x1f
shl eax, cl
mov ecx, edx
shr eax, cl
mov ecx, dword [esp + 0xbc]
add ecx, 4
push 2
lea esi, [ecx + eax*4]
push esi
push ebp
call fcn.00527800
movzx eax, byte [esi + 2]
add dword [esp + 0x74], eax
movzx eax, byte [esi + 3]
mov ecx, dword [esp + 0x60]
add ebp, eax
mov eax, dword [esp + 0x5c]
and ecx, 0x1f
shl eax, cl
mov ecx, dword [esp + 0x1c]
shr eax, cl
mov ecx, dword [esp + 0xc8]
add ecx, 4
push 2
lea esi, [ecx + eax*4]
push esi
push ebx
call fcn.00527800
movzx eax, byte [esi + 2]
add dword [esp + 0x6c], eax
movzx eax, byte [esi + 3]
mov ecx, dword [esp + 0x58]
add ebx, eax
mov eax, dword [esp + 0x54]
and ecx, 0x1f
shl eax, cl
mov ecx, dword [esp + 0x28]
shr eax, cl
mov ecx, dword [esp + 0xd4]
add ecx, 4
push 2
lea esi, [ecx + eax*4]
push esi
push edi
call fcn.00527800
movzx eax, byte [esi + 2]
add dword [esp + 0x64], eax
movzx eax, byte [esi + 3]
mov ecx, dword [esp + 0x50]
add edi, eax
mov eax, dword [esp + 0x4c]
and ecx, 0x1f
shl eax, cl
mov ecx, dword [esp + 0x34]
shr eax, cl
mov ecx, dword [esp + 0xe0]
add ecx, 4
push 2
lea esi, [ecx + eax*4]
push esi
push dword [esp + 0xa4]
call fcn.00527800
movzx eax, byte [esi + 2]
add dword [esp + 0x5c], eax
movzx eax, byte [esi + 3]
add dword [esp + 0xa8], eax
mov ecx, dword [esp + 0x98]
mov eax, dword [esp + 0x94]
and ecx, 0x1f
shl eax, cl
mov ecx, dword [esp + 0x40]
shr eax, cl
mov ecx, dword [esp + 0xec]
add ecx, 4
push 2
lea esi, [ecx + eax*4]
push esi
push ebp
call fcn.00527800
movzx eax, byte [esi + 2]
add dword [esp + 0xa4], eax
movzx eax, byte [esi + 3]
mov ecx, dword [esp + 0x90]
add ebp, eax
mov eax, dword [esp + 0x8c]
and ecx, 0x1f
shl eax, cl
mov ecx, dword [esp + 0x4c]
shr eax, cl
mov ecx, dword [esp + 0xf8]
add ecx, 4
push 2
lea esi, [ecx + eax*4]
push esi
push ebx
call fcn.00527800
movzx eax, byte [esi + 2]
add esp, 0x48
add dword [esp + 0x54], eax
movzx eax, byte [esi + 3]
mov ecx, dword [esp + 0x40]
add ebx, eax
mov eax, dword [esp + 0x3c]
and ecx, 0x1f
shl eax, cl
mov ecx, dword [esp + 0x10]
shr eax, cl
mov ecx, dword [esp + 0xbc]
add ecx, 4
push 2
lea esi, [ecx + eax*4]
push esi
push edi
call fcn.00527800
movzx eax, byte [esi + 2]
add dword [esp + 0x4c], eax
movzx eax, byte [esi + 3]
mov ecx, dword [esp + 0x38]
add edi, eax
mov eax, dword [esp + 0x34]
and ecx, 0x1f
shl eax, cl
mov ecx, dword [esp + 0x1c]
shr eax, cl
mov ecx, dword [esp + 0xc8]
add ecx, 4
mov dword [esp + 0x94], edi
mov edi, dword [esp + 0x84]
push 2
lea esi, [ecx + eax*4]
push esi
push edi
call fcn.00527800
movzx eax, byte [esi + 2]
add dword [esp + 0x44], eax
movzx eax, byte [esi + 3]
add edi, eax
lea eax, [esp + 0x40]
push eax
mov dword [esp + 0x94], edi
call fcn.00509d19
neg eax
sbb edi, edi
lea eax, [esp + 0x58]
push eax
inc edi
call fcn.00509d19
neg eax
sbb esi, esi
lea eax, [esp + 0x70]
inc esi
push eax
and esi, edi
call fcn.00509d19
xor edi, edi
test eax, eax
lea eax, [esp + 0x88]
push eax
cmove edi, esi
call fcn.00509d19
mov edx, dword [esp + 0x38]
add esp, 0x28
neg eax
sbb ecx, ecx
mov eax, dword [esp + 0x80]
inc ecx
and ecx, edi
cmp dword [esp + 0x78], eax
mov edi, dword [esp + 0x88]
sbb eax, eax
test ecx, eax
jne 0x50b76d
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x24], ebx
mov edx, dword [esp + 0x20]
cmp ebp, edx
ja 0x50b9da
cmp ebx, dword [esp + 0x84]
ja 0x50b9da
cmp edi, ecx
jbe 0x50b9e2
push 0xffffffffffffffec
pop eax
jmp 0x50c83d
mov eax, edx
sub eax, ebp
push 0x20
pop ebx
cmp eax, 4
jb 0x50bb32
add edx, 0xfffffffd
mov dword [esp + 0x90], edx
mov edx, dword [esp + 0x68]
mov esi, dword [esp + 0x6c]
cmp edx, ebx
jbe 0x50ba12
mov dword [esp + 0x10], 3
jmp 0x50ba91
cmp esi, dword [esp + 0x74]
jb 0x50ba29
lea eax, [esp + 0x64]
push eax
call fcn.00509d19
pop ecx
mov dword [esp + 0x10], eax
jmp 0x50ba89
mov edi, dword [esp + 0x70]
cmp esi, edi
jne 0x50ba3e
cmp edx, ebx
sbb eax, eax
add eax, 2
mov dword [esp + 0x10], eax
jmp 0x50ba95
and dword [esp + 0x10], 0
mov ecx, edx
shr ecx, 3
mov eax, esi
sub eax, ecx
cmp eax, edi
jae 0x50ba5c
mov ecx, esi
mov dword [esp + 0x10], 1
sub ecx, edi
imul eax, ecx, 0xfffffff8
sub esi, ecx
push 4
push esi
mov dword [esp + 0x74], esi
add edx, eax
lea eax, [esp + 0xa4]
push eax
mov dword [esp + 0x74], edx
call fcn.00527800
mov eax, dword [esp + 0xa8]
add esp, 0xc
mov dword [esp + 0x64], eax
mov edx, dword [esp + 0x68]
mov esi, dword [esp + 0x6c]
mov edi, dword [esp + 0x70]
cmp ebp, dword [esp + 0x90]
sbb ecx, ecx
xor eax, eax
neg ecx
cmp dword [esp + 0x10], eax
sete al
test eax, ecx
je 0x50bba3
mov edi, dword [esp + 0x18]
and edx, 0x1f
mov eax, dword [esp + 0x64]
mov ecx, edx
shl eax, cl
neg edi
and edi, 0x1f
mov ecx, edi
shr eax, cl
mov ecx, dword [esp + 0xbc]
add ecx, 4
push 2
lea esi, [ecx + eax*4]
push esi
push ebp
call fcn.00527800
movzx eax, byte [esi + 2]
mov ecx, dword [esp + 0x74]
add ecx, eax
movzx eax, byte [esi + 3]
mov dword [esp + 0x74], ecx
add ebp, eax
mov eax, dword [esp + 0x70]
and ecx, 0x1f
shl eax, cl
mov ecx, edi
shr eax, cl
mov ecx, dword [esp + 0xc8]
add ecx, 4
push 2
lea esi, [ecx + eax*4]
push esi
push ebp
call fcn.00527800
movzx eax, byte [esi + 2]
add esp, 0x18
mov edx, dword [esp + 0x68]
add edx, eax
movzx eax, byte [esi + 3]
mov dword [esp + 0x68], edx
add ebp, eax
jmp 0x50ba00
mov edx, dword [esp + 0x68]
mov esi, dword [esp + 0x6c]
cmp edx, ebx
ja 0x50bb9f
cmp esi, dword [esp + 0x74]
jb 0x50bb51
lea eax, [esp + 0x64]
push eax
call fcn.00509d19
pop ecx
jmp 0x50bb97
mov edi, dword [esp + 0x70]
cmp esi, edi
je 0x50bba3
mov ecx, edx
mov eax, esi
shr ecx, 3
sub eax, ecx
cmp eax, edi
jae 0x50bb6a
mov ecx, esi
sub ecx, edi
imul eax, ecx, 0xfffffff8
sub esi, ecx
push 4
push esi
mov dword [esp + 0x74], esi
add edx, eax
lea eax, [esp + 0x98]
push eax
mov dword [esp + 0x74], edx
call fcn.00527800
mov eax, dword [esp + 0x9c]
add esp, 0xc
mov dword [esp + 0x64], eax
mov edx, dword [esp + 0x68]
mov esi, dword [esp + 0x6c]
mov edi, dword [esp + 0x70]
mov ecx, dword [esp + 0x20]
mov eax, ecx
sub eax, ebp
cmp eax, 2
jb 0x50bd0e
lea eax, [ecx - 2]
mov dword [esp + 0x1c], eax
push 0x1f
pop eax
sub eax, dword [esp + 0x18]
mov dword [esp + 0x10], eax
cmp edx, ebx
jbe 0x50bbd4
push 3
pop edi
mov esi, eax
jmp 0x50bc57
cmp esi, dword [esp + 0x74]
jb 0x50bbe9
lea eax, [esp + 0x64]
push eax
call fcn.00509d19
pop ecx
mov edi, eax
jmp 0x50bc4f
cmp esi, edi
jne 0x50bbfd
mov esi, eax
cmp edx, ebx
jae 0x50bbf8
xor edi, edi
inc edi
jmp 0x50bc57
push 2
pop edi
jmp 0x50bc57
and dword [esp + 0x8c], 0
mov ecx, edx
shr ecx, 3
mov eax, esi
sub eax, ecx
cmp eax, edi
jae 0x50bc1b
mov ecx, esi
sub ecx, edi
xor edi, edi
inc edi
jmp 0x50bc22
mov edi, dword [esp + 0x8c]
imul eax, ecx, 0xfffffff8
sub esi, ecx
push 4
push esi
mov dword [esp + 0x74], esi
add edx, eax
lea eax, [esp + 0xa0]
push eax
mov dword [esp + 0x74], edx
call fcn.00527800
mov eax, dword [esp + 0xa4]
add esp, 0xc
mov dword [esp + 0x64], eax
mov edx, dword [esp + 0x68]
mov esi, dword [esp + 0x10]
cmp dword [esp + 0x1c], ebp
sbb ecx, ecx
xor eax, eax
inc ecx
test edi, edi
sete al
test eax, ecx
je 0x50bcbd
mov eax, dword [esp + 0x64]
and edx, 0x1f
mov ecx, edx
shl eax, cl
mov ecx, dword [esp + 0x18]
neg ecx
and ecx, 0x1f
shr eax, cl
mov ecx, dword [esp + 0xbc]
add ecx, 4
push 2
lea esi, [ecx + eax*4]
push esi
push ebp
call fcn.00527800
movzx eax, byte [esi + 2]
add esp, 0xc
mov edx, dword [esp + 0x68]
mov edi, dword [esp + 0x70]
add edx, eax
movzx eax, byte [esi + 3]
mov esi, dword [esp + 0x6c]
add ebp, eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x68], edx
jmp 0x50bbc6
mov edi, dword [esp + 0xbc]
cmp ebp, dword [esp + 0x1c]
ja 0x50bd15
lea ebx, [esi + 1]
and ebx, 0x1f
mov eax, dword [esp + 0x64]
and edx, 0x1f
mov ecx, edx
shl eax, cl
mov ecx, ebx
shr eax, cl
inc eax
push 2
lea esi, [edi + eax*4]
push esi
push ebp
call fcn.00527800
movzx eax, byte [esi + 2]
add esp, 0xc
mov edx, dword [esp + 0x68]
add edx, eax
movzx eax, byte [esi + 3]
add ebp, eax
mov dword [esp + 0x68], edx
cmp ebp, dword [esp + 0x1c]
jbe 0x50bcd0
push 0x20
pop ebx
jmp 0x50bd15
mov edi, dword [esp + 0xbc]
cmp ebp, dword [esp + 0x20]
jae 0x50bd68
mov eax, dword [esp + 0x64]
and edx, 0x1f
mov ecx, edx
shl eax, cl
mov ecx, dword [esp + 0x18]
neg ecx
and ecx, 0x1f
shr eax, cl
inc eax
push 1
lea esi, [edi + eax*4]
push esi
push ebp
call fcn.00527800
add esp, 0xc
cmp byte [esi + 3], 1
jne 0x50bd51
movzx eax, byte [esi + 2]
add dword [esp + 0x68], eax
jmp 0x50bd68
mov ecx, dword [esp + 0x68]
cmp ecx, ebx
jae 0x50bd68
movzx eax, byte [esi + 2]
add ecx, eax
cmp ecx, ebx
cmova ecx, ebx
mov dword [esp + 0x68], ecx
mov edx, dword [esp + 0x84]
mov eax, edx
mov ebp, dword [esp + 0x24]
sub eax, ebp
cmp eax, 4
jb 0x50beba
add edx, 0xfffffffd
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x54]
mov esi, dword [esp + 0x58]
cmp edx, ebx
jbe 0x50bd9d
mov dword [esp + 0x10], 3
jmp 0x50be1c
cmp esi, dword [esp + 0x60]
jb 0x50bdb4
lea eax, [esp + 0x50]
push eax
call fcn.00509d19
pop ecx
mov dword [esp + 0x10], eax
jmp 0x50be14
mov edi, dword [esp + 0x5c]
cmp esi, edi
jne 0x50bdc9
cmp edx, ebx
sbb eax, eax
add eax, 2
mov dword [esp + 0x10], eax
jmp 0x50be20
and dword [esp + 0x10], 0
mov ecx, edx
shr ecx, 3
mov eax, esi
sub eax, ecx
cmp eax, edi
jae 0x50bde7
mov ecx, esi
mov dword [esp + 0x10], 1
sub ecx, edi
imul eax, ecx, 0xfffffff8
sub esi, ecx
push 4
push esi
mov dword [esp + 0x60], esi
add edx, eax
lea eax, [esp + 0x94]
push eax
mov dword [esp + 0x60], edx
call fcn.00527800
mov eax, dword [esp + 0x98]
add esp, 0xc
mov dword [esp + 0x50], eax
mov edx, dword [esp + 0x54]
mov esi, dword [esp + 0x58]
mov edi, dword [esp + 0x5c]
cmp ebp, dword [esp + 0x24]
sbb ecx, ecx
xor eax, eax
neg ecx
cmp dword [esp + 0x10], eax
sete al
test eax, ecx
je 0x50bf2b
mov edi, dword [esp + 0x18]
and edx, 0x1f
mov eax, dword [esp + 0x50]
mov ecx, edx
shl eax, cl
neg edi
and edi, 0x1f
mov ecx, edi
shr eax, cl
mov ecx, dword [esp + 0xbc]
add ecx, 4
push 2
lea esi, [ecx + eax*4]
push esi
push ebp
call fcn.00527800
movzx eax, byte [esi + 2]
mov ecx, dword [esp + 0x60]
add ecx, eax
movzx eax, byte [esi + 3]
mov dword [esp + 0x60], ecx
add ebp, eax
mov eax, dword [esp + 0x5c]
and ecx, 0x1f
shl eax, cl
mov ecx, edi
shr eax, cl
mov ecx, dword [esp + 0xc8]
add ecx, 4
push 2
lea esi, [ecx + eax*4]
push esi
push ebp
call fcn.00527800
movzx eax, byte [esi + 2]
add esp, 0x18
mov edx, dword [esp + 0x54]
add edx, eax
movzx eax, byte [esi + 3]
mov dword [esp + 0x54], edx
add ebp, eax
jmp 0x50bd8b
mov edx, dword [esp + 0x54]
mov esi, dword [esp + 0x58]
cmp edx, ebx
ja 0x50bf27
cmp esi, dword [esp + 0x60]
jb 0x50bed9
lea eax, [esp + 0x50]
push eax
call fcn.00509d19
pop ecx
jmp 0x50bf1f
mov edi, dword [esp + 0x5c]
cmp esi, edi
je 0x50bf2b
mov ecx, edx
mov eax, esi
shr ecx, 3
sub eax, ecx
cmp eax, edi
jae 0x50bef2
mov ecx, esi
sub ecx, edi
imul eax, ecx, 0xfffffff8
sub esi, ecx
push 4
push esi
mov dword [esp + 0x60], esi
add edx, eax
lea eax, [esp + 0x9c]
push eax
mov dword [esp + 0x60], edx
call fcn.00527800
mov eax, dword [esp + 0xa0]
add esp, 0xc
mov dword [esp + 0x50], eax
mov edx, dword [esp + 0x54]
mov esi, dword [esp + 0x58]
mov edi, dword [esp + 0x5c]
mov ecx, dword [esp + 0x84]
mov eax, ecx
sub eax, ebp
cmp eax, 2
jb 0x50c090
lea eax, [ecx - 2]
mov dword [esp + 0x1c], eax
push 0x1f
pop eax
sub eax, dword [esp + 0x18]
mov dword [esp + 0x20], eax
cmp edx, ebx
jbe 0x50bf5c
push 3
pop edi
mov esi, eax
jmp 0x50bfd9
cmp esi, dword [esp + 0x60]
jb 0x50bf71
lea eax, [esp + 0x50]
push eax
call fcn.00509d19
pop ecx
mov edi, eax
jmp 0x50bfd1
cmp esi, edi
jne 0x50bf85
mov esi, eax
cmp edx, ebx
jae 0x50bf80
xor edi, edi
inc edi
jmp 0x50bfd9
push 2
pop edi
jmp 0x50bfd9
and dword [esp + 0x24], 0
mov ecx, edx
shr ecx, 3
mov eax, esi
sub eax, ecx
cmp eax, edi
jae 0x50bfa0
mov ecx, esi
sub ecx, edi
xor edi, edi
inc edi
jmp 0x50bfa4
mov edi, dword [esp + 0x24]
imul eax, ecx, 0xfffffff8
sub esi, ecx
push 4
push esi
mov dword [esp + 0x60], esi
add edx, eax
lea eax, [esp + 0xa8]
push eax
mov dword [esp + 0x60], edx
call fcn.00527800
mov eax, dword [esp + 0xac]
add esp, 0xc
mov dword [esp + 0x50], eax
mov edx, dword [esp + 0x54]
mov esi, dword [esp + 0x20]
cmp dword [esp + 0x1c], ebp
sbb ecx, ecx
xor eax, eax
inc ecx
test edi, edi
sete al
test eax, ecx
je 0x50c03f
mov eax, dword [esp + 0x50]
and edx, 0x1f
mov ecx, edx
shl eax, cl
mov ecx, dword [esp + 0x18]
neg ecx
and ecx, 0x1f
shr eax, cl
mov ecx, dword [esp + 0xbc]
add ecx, 4
push 2
lea esi, [ecx + eax*4]
push esi
push ebp
call fcn.00527800
movzx eax, byte [esi + 2]
add esp, 0xc
mov edx, dword [esp + 0x54]
mov edi, dword [esp + 0x5c]
add edx, eax
movzx eax, byte [esi + 3]
mov esi, dword [esp + 0x58]
add ebp, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x54], edx
jmp 0x50bf51
mov edi, dword [esp + 0xbc]
cmp ebp, dword [esp + 0x1c]
ja 0x50c097
lea ebx, [esi + 1]
and ebx, 0x1f
mov eax, dword [esp + 0x50]
and edx, 0x1f
mov ecx, edx
shl eax, cl
mov ecx, ebx
shr eax, cl
inc eax
push 2
lea esi, [edi + eax*4]
push esi
push ebp
call fcn.00527800
movzx eax, byte [esi + 2]
add esp, 0xc
mov edx, dword [esp + 0x54]
add edx, eax
movzx eax, byte [esi + 3]
add ebp, eax
mov dword [esp + 0x54], edx
cmp ebp, dword [esp + 0x1c]
jbe 0x50c052
push 0x20
pop ebx
jmp 0x50c097
mov edi, dword [esp + 0xbc]
cmp ebp, dword [esp + 0x84]
jae 0x50c0ed
mov eax, dword [esp + 0x50]
and edx, 0x1f
mov ecx, edx
shl eax, cl
mov ecx, dword [esp + 0x18]
neg ecx
and ecx, 0x1f
shr eax, cl
inc eax
push 1
lea esi, [edi + eax*4]
push esi
push ebp
call fcn.00527800
add esp, 0xc
cmp byte [esi + 3], 1
jne 0x50c0d6
movzx eax, byte [esi + 2]
add dword [esp + 0x54], eax
jmp 0x50c0ed
mov ecx, dword [esp + 0x54]
cmp ecx, ebx
jae 0x50c0ed
movzx eax, byte [esi + 2]
add ecx, eax
cmp ecx, ebx
cmova ecx, ebx
mov dword [esp + 0x54], ecx
mov edx, dword [esp + 0x14]
mov eax, edx
mov ebp, dword [esp + 0x88]
sub eax, ebp
cmp eax, 4
jb 0x50c23f
add edx, 0xfffffffd
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x40]
mov esi, dword [esp + 0x44]
cmp edx, ebx
jbe 0x50c122
mov dword [esp + 0x10], 3
jmp 0x50c1a1
cmp esi, dword [esp + 0x4c]
jb 0x50c139
lea eax, [esp + 0x3c]
push eax
call fcn.00509d19
pop ecx
mov dword [esp + 0x10], eax
jmp 0x50c199
mov edi, dword [esp + 0x48]
cmp esi, edi
jne 0x50c14e
cmp edx, ebx
sbb eax, eax
add eax, 2
mov dword [esp + 0x10], eax
jmp 0x50c1a5
and dword [esp + 0x10], 0
mov ecx, edx
shr ecx, 3
mov eax, esi
sub eax, ecx
cmp eax, edi
jae 0x50c16c
mov ecx, esi
mov dword [esp + 0x10], 1
sub ecx, edi
imul eax, ecx, 0xfffffff8
sub esi, ecx
push 4
push esi
mov dword [esp + 0x4c], esi
add edx, eax
lea eax, [esp + 0x90]
push eax
mov dword [esp + 0x4c], edx
call fcn.00527800
mov eax, dword [esp + 0x94]
add esp, 0xc
mov dword [esp + 0x3c], eax
mov edx, dword [esp + 0x40]
mov esi, dword [esp + 0x44]
mov edi, dword [esp + 0x48]
cmp ebp, dword [esp + 0x24]
sbb ecx, ecx
xor eax, eax
neg ecx
cmp dword [esp + 0x10], eax
sete al
test eax, ecx
je 0x50c2b0
mov edi, dword [esp + 0x18]
and edx, 0x1f
mov eax, dword [esp + 0x3c]
mov ecx, edx
shl eax, cl
neg edi
and edi, 0x1f
mov ecx, edi
shr eax, cl
mov ecx, dword [esp + 0xbc]
add ecx, 4
push 2
lea esi, [ecx + eax*4]
push esi
push ebp
call fcn.00527800
movzx eax, byte [esi + 2]
mov ecx, dword [esp + 0x4c]
add ecx, eax
movzx eax, byte [esi + 3]
mov dword [esp + 0x4c], ecx
add ebp, eax
mov eax, dword [esp + 0x48]
and ecx, 0x1f
shl eax, cl
mov ecx, edi
shr eax, cl
mov ecx, dword [esp + 0xc8]
add ecx, 4
push 2
lea esi, [ecx + eax*4]
push esi
push ebp
call fcn.00527800
movzx eax, byte [esi + 2]
add esp, 0x18
mov edx, dword [esp + 0x40]
add edx, eax
movzx eax, byte [esi + 3]
mov dword [esp + 0x40], edx
add ebp, eax
jmp 0x50c110
mov edx, dword [esp + 0x40]
mov esi, dword [esp + 0x44]
cmp edx, ebx
ja 0x50c2ac
cmp esi, dword [esp + 0x4c]
jb 0x50c25e
lea eax, [esp + 0x3c]
push eax
call fcn.00509d19
pop ecx
jmp 0x50c2a4
mov edi, dword [esp + 0x48]
cmp esi, edi
je 0x50c2b0
mov ecx, edx
mov eax, esi
shr ecx, 3
sub eax, ecx
cmp eax, edi
jae 0x50c277
mov ecx, esi
sub ecx, edi
imul eax, ecx, 0xfffffff8
sub esi, ecx
push 4
push esi
mov dword [esp + 0x4c], esi
add edx, eax
lea eax, [esp + 0x8c]
push eax
mov dword [esp + 0x4c], edx
call fcn.00527800
mov eax, dword [esp + 0x90]
add esp, 0xc
mov dword [esp + 0x3c], eax
mov edx, dword [esp + 0x40]
mov esi, dword [esp + 0x44]
mov edi, dword [esp + 0x48]
mov ecx, dword [esp + 0x14]
mov eax, ecx
sub eax, ebp
cmp eax, 2
jb 0x50c40c
lea eax, [ecx - 2]
mov dword [esp + 0x1c], eax
push 0x1f
pop eax
sub eax, dword [esp + 0x18]
mov dword [esp + 0x20], eax
cmp edx, ebx
jbe 0x50c2de
push 3
pop edi
mov esi, eax
jmp 0x50c355
cmp esi, dword [esp + 0x4c]
jb 0x50c2f3
lea eax, [esp + 0x3c]
push eax
call fcn.00509d19
pop ecx
mov edi, eax
jmp 0x50c34d
cmp esi, edi
jne 0x50c307
mov esi, eax
cmp edx, ebx
jae 0x50c302
xor edi, edi
inc edi
jmp 0x50c355
push 2
pop edi
jmp 0x50c355
and dword [esp + 0x24], 0
mov ecx, edx
shr ecx, 3
mov eax, esi
sub eax, ecx
cmp eax, edi
jae 0x50c322
mov ecx, esi
sub ecx, edi
xor edi, edi
inc edi
jmp 0x50c326
mov edi, dword [esp + 0x24]
imul eax, ecx, 0xfffffff8
sub esi, ecx
push 4
push esi
mov dword [esp + 0x4c], esi
add edx, eax
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x4c], edx
call fcn.00527800
mov eax, dword [esp + 0x1c]
add esp, 0xc
mov dword [esp + 0x3c], eax
mov edx, dword [esp + 0x40]
mov esi, dword [esp + 0x20]
cmp dword [esp + 0x1c], ebp
sbb ecx, ecx
xor eax, eax
inc ecx
test edi, edi
sete al
test eax, ecx
je 0x50c3bb
mov eax, dword [esp + 0x3c]
and edx, 0x1f
mov ecx, edx
shl eax, cl
mov ecx, dword [esp + 0x18]
neg ecx
and ecx, 0x1f
shr eax, cl
mov ecx, dword [esp + 0xbc]
add ecx, 4
push 2
lea esi, [ecx + eax*4]
push esi
push ebp
call fcn.00527800
movzx eax, byte [esi + 2]
add esp, 0xc
mov edx, dword [esp + 0x40]
mov edi, dword [esp + 0x48]
add edx, eax
movzx eax, byte [esi + 3]
mov esi, dword [esp + 0x44]
add ebp, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x40], edx
jmp 0x50c2d3
mov edi, dword [esp + 0xbc]
cmp ebp, dword [esp + 0x1c]
ja 0x50c413
lea ebx, [esi + 1]
and ebx, 0x1f
mov eax, dword [esp + 0x3c]
and edx, 0x1f
mov ecx, edx
shl eax, cl
mov ecx, ebx
shr eax, cl
inc eax
push 2
lea esi, [edi + eax*4]
push esi
push ebp
call fcn.00527800
movzx eax, byte [esi + 2]
add esp, 0xc
mov edx, dword [esp + 0x40]
add edx, eax
movzx eax, byte [esi + 3]
add ebp, eax
mov dword [esp + 0x40], edx
cmp ebp, dword [esp + 0x1c]
jbe 0x50c3ce
push 0x20
pop ebx
jmp 0x50c413
mov edi, dword [esp + 0xbc]
cmp ebp, dword [esp + 0x14]
jae 0x50c466
mov eax, dword [esp + 0x3c]
and edx, 0x1f
mov ecx, edx
shl eax, cl
mov ecx, dword [esp + 0x18]
neg ecx
and ecx, 0x1f
shr eax, cl
inc eax
push 1
lea esi, [edi + eax*4]
push esi
push ebp
call fcn.00527800
add esp, 0xc
cmp byte [esi + 3], 1
jne 0x50c44f
movzx eax, byte [esi + 2]
add dword [esp + 0x40], eax
jmp 0x50c466
mov ecx, dword [esp + 0x40]
cmp ecx, ebx
jae 0x50c466
movzx eax, byte [esi + 2]
add ecx, eax
cmp ecx, ebx
cmova ecx, ebx
mov dword [esp + 0x40], ecx
mov eax, dword [esp + 0x7c]
mov ebp, dword [esp + 0x78]
sub eax, ebp
mov edx, dword [esp + 0x2c]
cmp eax, 4
jb 0x50c5ad
mov esi, dword [esp + 0x30]
cmp edx, ebx
jbe 0x50c48f
mov dword [esp + 0x14], 3
jmp 0x50c508
cmp esi, dword [esp + 0x38]
jb 0x50c4a6
lea eax, [esp + 0x28]
push eax
call fcn.00509d19
pop ecx
mov dword [esp + 0x14], eax
jmp 0x50c500
mov edi, dword [esp + 0x34]
cmp esi, edi
jne 0x50c4bb
cmp edx, ebx
sbb eax, eax
add eax, 2
mov dword [esp + 0x14], eax
jmp 0x50c50c
and dword [esp + 0x14], 0
mov ecx, edx
shr ecx, 3
mov eax, esi
sub eax, ecx
cmp eax, edi
jae 0x50c4d9
mov ecx, esi
mov dword [esp + 0x14], 1
sub ecx, edi
imul eax, ecx, 0xfffffff8
sub esi, ecx
push 4
push esi
mov dword [esp + 0x38], esi
add edx, eax
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x38], edx
call fcn.00527800
mov eax, dword [esp + 0x2c]
add esp, 0xc
mov dword [esp + 0x28], eax
mov edx, dword [esp + 0x2c]
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x34]
cmp ebp, dword [esp + 0x80]
sbb ecx, ecx
xor eax, eax
neg ecx
cmp dword [esp + 0x14], eax
sete al
test eax, ecx
je 0x50c614
mov edi, dword [esp + 0x18]
and edx, 0x1f
mov eax, dword [esp + 0x28]
mov ecx, edx
shl eax, cl
neg edi
and edi, 0x1f
mov ecx, edi
shr eax, cl
mov ecx, dword [esp + 0xbc]
add ecx, 4
push 2
lea esi, [ecx + eax*4]
push esi
push ebp
call fcn.00527800
movzx eax, byte [esi + 2]
mov ecx, dword [esp + 0x38]
add ecx, eax
movzx eax, byte [esi + 3]
mov dword [esp + 0x38], ecx
add ebp, eax
mov eax, dword [esp + 0x34]
and ecx, 0x1f
shl eax, cl
mov ecx, edi
shr eax, cl
mov ecx, dword [esp + 0xc8]
add ecx, 4
push 2
lea esi, [ecx + eax*4]
push esi
push ebp
call fcn.00527800
movzx eax, byte [esi + 2]
add esp, 0x18
mov edx, dword [esp + 0x2c]
add edx, eax
movzx eax, byte [esi + 3]
add ebp, eax
mov dword [esp + 0x2c], edx
mov dword [esp + 0x78], ebp
jmp 0x50c47d
mov esi, dword [esp + 0x30]
cmp edx, ebx
ja 0x50c610
cmp esi, dword [esp + 0x38]
jb 0x50c5c8
lea eax, [esp + 0x28]
push eax
call fcn.00509d19
pop ecx
jmp 0x50c608
mov edi, dword [esp + 0x34]
cmp esi, edi
je 0x50c614
mov ecx, edx
mov eax, esi
shr ecx, 3
sub eax, ecx
cmp eax, edi
jae 0x50c5e1
mov ecx, esi
sub ecx, edi
imul eax, ecx, 0xfffffff8
sub esi, ecx
push 4
push esi
mov dword [esp + 0x38], esi
add edx, eax
lea eax, [esp + 0x24]
push eax
mov dword [esp + 0x38], edx
call fcn.00527800
mov eax, dword [esp + 0x28]
add esp, 0xc
mov dword [esp + 0x28], eax
mov edx, dword [esp + 0x2c]
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x34]
mov eax, dword [esp + 0x7c]
sub eax, ebp
mov ebp, dword [esp + 0x18]
cmp eax, 2
jb 0x50c79f
push 0x1f
pop eax
sub eax, ebp
mov dword [esp + 0x80], eax
cmp edx, ebx
jbe 0x50c63f
push 3
pop esi
jmp 0x50c6c4
cmp esi, dword [esp + 0x38]
jb 0x50c654
lea eax, [esp + 0x28]
push eax
call fcn.00509d19
pop ecx
mov esi, eax
jmp 0x50c6b9
cmp esi, edi
jne 0x50c66a
mov dword [esp + 0x14], eax
cmp edx, ebx
jae 0x50c665
xor esi, esi
inc esi
jmp 0x50c6c8
push 2
pop esi
jmp 0x50c6c8
and dword [esp + 0x24], 0
mov ecx, edx
shr ecx, 3
mov eax, esi
sub eax, ecx
cmp eax, edi
jae 0x50c688
mov ecx, esi
mov dword [esp + 0x24], 1
sub ecx, edi
imul eax, ecx, 0xfffffff8
sub esi, ecx
push 4
push esi
mov dword [esp + 0x38], esi
add edx, eax
lea eax, [esp + 0xac]
push eax
mov dword [esp + 0x38], edx
call fcn.00527800
mov eax, dword [esp + 0xb0]
add esp, 0xc
mov esi, dword [esp + 0x24]
mov dword [esp + 0x28], eax
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x80]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x7c]
mov edi, dword [esp + 0x78]
add eax, 0xfffffffe
cmp eax, edi
sbb ecx, ecx
xor eax, eax
inc ecx
test esi, esi
sete al
test eax, ecx
je 0x50c73c
mov eax, dword [esp + 0x28]
and edx, 0x1f
mov ecx, edx
shl eax, cl
mov ecx, ebp
neg ecx
and ecx, 0x1f
shr eax, cl
mov ecx, dword [esp + 0xbc]
add ecx, 4
push 2
lea esi, [ecx + eax*4]
push esi
push edi
call fcn.00527800
movzx eax, byte [esi + 2]
add esp, 0xc
mov edx, dword [esp + 0x2c]
add edx, eax
movzx eax, byte [esi + 3]
mov esi, dword [esp + 0x30]
add edi, eax
mov eax, dword [esp + 0x80]
mov dword [esp + 0x78], edi
mov edi, dword [esp + 0x34]
mov dword [esp + 0x2c], edx
jmp 0x50c633
mov eax, dword [esp + 0x7c]
add eax, 0xfffffffe
cmp edi, eax
ja 0x50c7a3
mov ebx, dword [esp + 0x14]
mov ebp, dword [esp + 0xbc]
inc ebx
and ebx, 0x1f
mov eax, dword [esp + 0x28]
lea esi, [ebp + 4]
and edx, 0x1f
mov ecx, edx
shl eax, cl
mov ecx, ebx
shr eax, cl
push 2
lea esi, [esi + eax*4]
push esi
push edi
call fcn.00527800
movzx eax, byte [esi + 2]
add esp, 0xc
mov edx, dword [esp + 0x2c]
add edx, eax
movzx eax, byte [esi + 3]
add edi, eax
mov dword [esp + 0x2c], edx
mov eax, dword [esp + 0x7c]
add eax, 0xfffffffe
cmp edi, eax
jbe 0x50c756
mov ebp, dword [esp + 0x18]
push 0x20
pop ebx
jmp 0x50c7a3
mov edi, dword [esp + 0x78]
cmp edi, dword [esp + 0x7c]
jae 0x50c7fd
mov eax, dword [esp + 0x28]
and edx, 0x1f
mov ecx, edx
neg ebp
shl eax, cl
and ebp, 0x1f
mov ecx, ebp
shr eax, cl
mov ecx, dword [esp + 0xbc]
add ecx, 4
push 1
lea esi, [ecx + eax*4]
push esi
push edi
call fcn.00527800
add esp, 0xc
cmp byte [esi + 3], 1
jne 0x50c7e6
movzx eax, byte [esi + 2]
add dword [esp + 0x2c], eax
jmp 0x50c7fd
mov ecx, dword [esp + 0x2c]
cmp ecx, ebx
jae 0x50c7fd
movzx eax, byte [esi + 2]
add ecx, eax
cmp ecx, ebx
cmova ecx, ebx
mov dword [esp + 0x2c], ecx
lea eax, [esp + 0x28]
push eax
call fcn.00509bdd
mov edx, eax
lea eax, [esp + 0x40]
push eax
call fcn.00509bdd
and edx, eax
lea eax, [esp + 0x58]
push eax
call fcn.00509bdd
and edx, eax
lea eax, [esp + 0x70]
push eax
call fcn.00509bdd
add esp, 0x10
test eax, edx
mov eax, dword [esp + 0xb0]
push 0xffffffffffffffec
pop ecx
cmove eax, ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x98
ret