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

Disassembly:
sub esp, 0x98
push ebx
mov ebx, dword [esp + 0xac]
cmp ebx, 0xa
jae 0x50c088
push 0xffffffffffffffec
pop eax
jmp 0x50d320
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.0050e0c3
movzx edi, ax
lea eax, [esi + 2]
push eax
mov dword [esp + 0x94], edi
call fcn.0050e0c3
movzx eax, ax
mov dword [esp + 0x24], eax
lea eax, [esi + 4]
push eax
call fcn.0050e0c3
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.0050707e
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 0x50c4ba
mov ecx, dword [esp + 0x14]
cmp ecx, dword [esp + 0x7c]
ja 0x50c4ba
cmp dword [esp + 0xb0], 6
jb 0x50c4ba
push dword [esp + 0x8c]
lea eax, [esp + 0x68]
push dword [esp + 0x94]
push eax
call fcn.0050a6d6
add esp, 0xc
cmp eax, 0xffffff88
ja 0x50d31d
push dword [esp + 0x1c]
lea eax, [esp + 0x54]
push dword [esp + 0xa0]
push eax
call fcn.0050a6d6
add esp, 0xc
cmp eax, 0xffffff88
ja 0x50d31d
push dword [esp + 0x94]
lea eax, [esp + 0x40]
push dword [esp + 0x9c]
push eax
call fcn.0050a6d6
add esp, 0xc
cmp eax, 0xffffff88
ja 0x50d31d
push dword [esp + 0x10]
mov eax, dword [esp + 0x98]
add eax, dword [esp + 0x9c]
push eax
lea eax, [esp + 0x30]
push eax
call fcn.0050a6d6
add esp, 0xc
cmp eax, 0xffffff88
ja 0x50d31d
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x14]
sub eax, ecx
cmp eax, 4
jb 0x50c4a5
cmp ecx, dword [esp + 0x80]
jae 0x50c4a5
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.005282e0
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.005282e0
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.005282e0
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.005282e0
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.005282e0
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.005282e0
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.005282e0
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.005282e0
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.0050a7f9
neg eax
sbb edi, edi
lea eax, [esp + 0x58]
push eax
inc edi
call fcn.0050a7f9
neg eax
sbb esi, esi
lea eax, [esp + 0x70]
inc esi
push eax
and esi, edi
call fcn.0050a7f9
xor edi, edi
test eax, eax
lea eax, [esp + 0x88]
push eax
cmove edi, esi
call fcn.0050a7f9
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 0x50c24d
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x24], ebx
mov edx, dword [esp + 0x20]
cmp ebp, edx
ja 0x50c4ba
cmp ebx, dword [esp + 0x84]
ja 0x50c4ba
cmp edi, ecx
jbe 0x50c4c2
push 0xffffffffffffffec
pop eax
jmp 0x50d31d
mov eax, edx
sub eax, ebp
push 0x20
pop ebx
cmp eax, 4
jb 0x50c612
add edx, 0xfffffffd
mov dword [esp + 0x90], edx
mov edx, dword [esp + 0x68]
mov esi, dword [esp + 0x6c]
cmp edx, ebx
jbe 0x50c4f2
mov dword [esp + 0x10], 3
jmp 0x50c571
cmp esi, dword [esp + 0x74]
jb 0x50c509
lea eax, [esp + 0x64]
push eax
call fcn.0050a7f9
pop ecx
mov dword [esp + 0x10], eax
jmp 0x50c569
mov edi, dword [esp + 0x70]
cmp esi, edi
jne 0x50c51e
cmp edx, ebx
sbb eax, eax
add eax, 2
mov dword [esp + 0x10], eax
jmp 0x50c575
and dword [esp + 0x10], 0
mov ecx, edx
shr ecx, 3
mov eax, esi
sub eax, ecx
cmp eax, edi
jae 0x50c53c
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.005282e0
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 0x50c683
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.005282e0
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.005282e0
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 0x50c4e0
mov edx, dword [esp + 0x68]
mov esi, dword [esp + 0x6c]
cmp edx, ebx
ja 0x50c67f
cmp esi, dword [esp + 0x74]
jb 0x50c631
lea eax, [esp + 0x64]
push eax
call fcn.0050a7f9
pop ecx
jmp 0x50c677
mov edi, dword [esp + 0x70]
cmp esi, edi
je 0x50c683
mov ecx, edx
mov eax, esi
shr ecx, 3
sub eax, ecx
cmp eax, edi
jae 0x50c64a
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.005282e0
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 0x50c7ee
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 0x50c6b4
push 3
pop edi
mov esi, eax
jmp 0x50c737
cmp esi, dword [esp + 0x74]
jb 0x50c6c9
lea eax, [esp + 0x64]
push eax
call fcn.0050a7f9
pop ecx
mov edi, eax
jmp 0x50c72f
cmp esi, edi
jne 0x50c6dd
mov esi, eax
cmp edx, ebx
jae 0x50c6d8
xor edi, edi
inc edi
jmp 0x50c737
push 2
pop edi
jmp 0x50c737
and dword [esp + 0x8c], 0
mov ecx, edx
shr ecx, 3
mov eax, esi
sub eax, ecx
cmp eax, edi
jae 0x50c6fb
mov ecx, esi
sub ecx, edi
xor edi, edi
inc edi
jmp 0x50c702
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.005282e0
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 0x50c79d
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.005282e0
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 0x50c6a6
mov edi, dword [esp + 0xbc]
cmp ebp, dword [esp + 0x1c]
ja 0x50c7f5
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.005282e0
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 0x50c7b0
push 0x20
pop ebx
jmp 0x50c7f5
mov edi, dword [esp + 0xbc]
cmp ebp, dword [esp + 0x20]
jae 0x50c848
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.005282e0
add esp, 0xc
cmp byte [esi + 3], 1
jne 0x50c831
movzx eax, byte [esi + 2]
add dword [esp + 0x68], eax
jmp 0x50c848
mov ecx, dword [esp + 0x68]
cmp ecx, ebx
jae 0x50c848
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 0x50c99a
add edx, 0xfffffffd
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x54]
mov esi, dword [esp + 0x58]
cmp edx, ebx
jbe 0x50c87d
mov dword [esp + 0x10], 3
jmp 0x50c8fc
cmp esi, dword [esp + 0x60]
jb 0x50c894
lea eax, [esp + 0x50]
push eax
call fcn.0050a7f9
pop ecx
mov dword [esp + 0x10], eax
jmp 0x50c8f4
mov edi, dword [esp + 0x5c]
cmp esi, edi
jne 0x50c8a9
cmp edx, ebx
sbb eax, eax
add eax, 2
mov dword [esp + 0x10], eax
jmp 0x50c900
and dword [esp + 0x10], 0
mov ecx, edx
shr ecx, 3
mov eax, esi
sub eax, ecx
cmp eax, edi
jae 0x50c8c7
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.005282e0
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 0x50ca0b
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.005282e0
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.005282e0
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 0x50c86b
mov edx, dword [esp + 0x54]
mov esi, dword [esp + 0x58]
cmp edx, ebx
ja 0x50ca07
cmp esi, dword [esp + 0x60]
jb 0x50c9b9
lea eax, [esp + 0x50]
push eax
call fcn.0050a7f9
pop ecx
jmp 0x50c9ff
mov edi, dword [esp + 0x5c]
cmp esi, edi
je 0x50ca0b
mov ecx, edx
mov eax, esi
shr ecx, 3
sub eax, ecx
cmp eax, edi
jae 0x50c9d2
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.005282e0
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 0x50cb70
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 0x50ca3c
push 3
pop edi
mov esi, eax
jmp 0x50cab9
cmp esi, dword [esp + 0x60]
jb 0x50ca51
lea eax, [esp + 0x50]
push eax
call fcn.0050a7f9
pop ecx
mov edi, eax
jmp 0x50cab1
cmp esi, edi
jne 0x50ca65
mov esi, eax
cmp edx, ebx
jae 0x50ca60
xor edi, edi
inc edi
jmp 0x50cab9
push 2
pop edi
jmp 0x50cab9
and dword [esp + 0x24], 0
mov ecx, edx
shr ecx, 3
mov eax, esi
sub eax, ecx
cmp eax, edi
jae 0x50ca80
mov ecx, esi
sub ecx, edi
xor edi, edi
inc edi
jmp 0x50ca84
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.005282e0
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 0x50cb1f
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.005282e0
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 0x50ca31
mov edi, dword [esp + 0xbc]
cmp ebp, dword [esp + 0x1c]
ja 0x50cb77
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.005282e0
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 0x50cb32
push 0x20
pop ebx
jmp 0x50cb77
mov edi, dword [esp + 0xbc]
cmp ebp, dword [esp + 0x84]
jae 0x50cbcd
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.005282e0
add esp, 0xc
cmp byte [esi + 3], 1
jne 0x50cbb6
movzx eax, byte [esi + 2]
add dword [esp + 0x54], eax
jmp 0x50cbcd
mov ecx, dword [esp + 0x54]
cmp ecx, ebx
jae 0x50cbcd
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 0x50cd1f
add edx, 0xfffffffd
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x40]
mov esi, dword [esp + 0x44]
cmp edx, ebx
jbe 0x50cc02
mov dword [esp + 0x10], 3
jmp 0x50cc81
cmp esi, dword [esp + 0x4c]
jb 0x50cc19
lea eax, [esp + 0x3c]
push eax
call fcn.0050a7f9
pop ecx
mov dword [esp + 0x10], eax
jmp 0x50cc79
mov edi, dword [esp + 0x48]
cmp esi, edi
jne 0x50cc2e
cmp edx, ebx
sbb eax, eax
add eax, 2
mov dword [esp + 0x10], eax
jmp 0x50cc85
and dword [esp + 0x10], 0
mov ecx, edx
shr ecx, 3
mov eax, esi
sub eax, ecx
cmp eax, edi
jae 0x50cc4c
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.005282e0
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 0x50cd90
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.005282e0
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.005282e0
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 0x50cbf0
mov edx, dword [esp + 0x40]
mov esi, dword [esp + 0x44]
cmp edx, ebx
ja 0x50cd8c
cmp esi, dword [esp + 0x4c]
jb 0x50cd3e
lea eax, [esp + 0x3c]
push eax
call fcn.0050a7f9
pop ecx
jmp 0x50cd84
mov edi, dword [esp + 0x48]
cmp esi, edi
je 0x50cd90
mov ecx, edx
mov eax, esi
shr ecx, 3
sub eax, ecx
cmp eax, edi
jae 0x50cd57
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.005282e0
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 0x50ceec
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 0x50cdbe
push 3
pop edi
mov esi, eax
jmp 0x50ce35
cmp esi, dword [esp + 0x4c]
jb 0x50cdd3
lea eax, [esp + 0x3c]
push eax
call fcn.0050a7f9
pop ecx
mov edi, eax
jmp 0x50ce2d
cmp esi, edi
jne 0x50cde7
mov esi, eax
cmp edx, ebx
jae 0x50cde2
xor edi, edi
inc edi
jmp 0x50ce35
push 2
pop edi
jmp 0x50ce35
and dword [esp + 0x24], 0
mov ecx, edx
shr ecx, 3
mov eax, esi
sub eax, ecx
cmp eax, edi
jae 0x50ce02
mov ecx, esi
sub ecx, edi
xor edi, edi
inc edi
jmp 0x50ce06
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.005282e0
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 0x50ce9b
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.005282e0
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 0x50cdb3
mov edi, dword [esp + 0xbc]
cmp ebp, dword [esp + 0x1c]
ja 0x50cef3
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.005282e0
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 0x50ceae
push 0x20
pop ebx
jmp 0x50cef3
mov edi, dword [esp + 0xbc]
cmp ebp, dword [esp + 0x14]
jae 0x50cf46
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.005282e0
add esp, 0xc
cmp byte [esi + 3], 1
jne 0x50cf2f
movzx eax, byte [esi + 2]
add dword [esp + 0x40], eax
jmp 0x50cf46
mov ecx, dword [esp + 0x40]
cmp ecx, ebx
jae 0x50cf46
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 0x50d08d
mov esi, dword [esp + 0x30]
cmp edx, ebx
jbe 0x50cf6f
mov dword [esp + 0x14], 3
jmp 0x50cfe8
cmp esi, dword [esp + 0x38]
jb 0x50cf86
lea eax, [esp + 0x28]
push eax
call fcn.0050a7f9
pop ecx
mov dword [esp + 0x14], eax
jmp 0x50cfe0
mov edi, dword [esp + 0x34]
cmp esi, edi
jne 0x50cf9b
cmp edx, ebx
sbb eax, eax
add eax, 2
mov dword [esp + 0x14], eax
jmp 0x50cfec
and dword [esp + 0x14], 0
mov ecx, edx
shr ecx, 3
mov eax, esi
sub eax, ecx
cmp eax, edi
jae 0x50cfb9
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.005282e0
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 0x50d0f4
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.005282e0
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.005282e0
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 0x50cf5d
mov esi, dword [esp + 0x30]
cmp edx, ebx
ja 0x50d0f0
cmp esi, dword [esp + 0x38]
jb 0x50d0a8
lea eax, [esp + 0x28]
push eax
call fcn.0050a7f9
pop ecx
jmp 0x50d0e8
mov edi, dword [esp + 0x34]
cmp esi, edi
je 0x50d0f4
mov ecx, edx
mov eax, esi
shr ecx, 3
sub eax, ecx
cmp eax, edi
jae 0x50d0c1
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.005282e0
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 0x50d27f
push 0x1f
pop eax
sub eax, ebp
mov dword [esp + 0x80], eax
cmp edx, ebx
jbe 0x50d11f
push 3
pop esi
jmp 0x50d1a4
cmp esi, dword [esp + 0x38]
jb 0x50d134
lea eax, [esp + 0x28]
push eax
call fcn.0050a7f9
pop ecx
mov esi, eax
jmp 0x50d199
cmp esi, edi
jne 0x50d14a
mov dword [esp + 0x14], eax
cmp edx, ebx
jae 0x50d145
xor esi, esi
inc esi
jmp 0x50d1a8
push 2
pop esi
jmp 0x50d1a8
and dword [esp + 0x24], 0
mov ecx, edx
shr ecx, 3
mov eax, esi
sub eax, ecx
cmp eax, edi
jae 0x50d168
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.005282e0
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 0x50d21c
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.005282e0
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 0x50d113
mov eax, dword [esp + 0x7c]
add eax, 0xfffffffe
cmp edi, eax
ja 0x50d283
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.005282e0
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 0x50d236
mov ebp, dword [esp + 0x18]
push 0x20
pop ebx
jmp 0x50d283
mov edi, dword [esp + 0x78]
cmp edi, dword [esp + 0x7c]
jae 0x50d2dd
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.005282e0
add esp, 0xc
cmp byte [esi + 3], 1
jne 0x50d2c6
movzx eax, byte [esi + 2]
add dword [esp + 0x2c], eax
jmp 0x50d2dd
mov ecx, dword [esp + 0x2c]
cmp ecx, ebx
jae 0x50d2dd
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.0050a6bd
mov edx, eax
lea eax, [esp + 0x40]
push eax
call fcn.0050a6bd
and edx, eax
lea eax, [esp + 0x58]
push eax
call fcn.0050a6bd
and edx, eax
lea eax, [esp + 0x70]
push eax
call fcn.0050a6bd
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