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

Disassembly:
sub esp, 0x94
push ebx
mov ebx, dword [esp + 0xa8]
cmp ebx, 0xa
jae 0x50b06a
push 0xffffffffffffffec
pop eax
jmp 0x50bffe
mov eax, dword [esp + 0xa0]
add eax, dword [esp + 0x9c]
push ebp
push esi
mov esi, dword [esp + 0xac]
mov dword [esp + 0x88], eax
add eax, 0xfffffffd
push edi
push esi
mov dword [esp + 0x14], eax
call fcn.0050e151
movzx ebp, ax
lea eax, [esi + 2]
push eax
mov dword [esp + 0x98], ebp
call fcn.0050e151
movzx edi, ax
lea eax, [esi + 4]
push eax
mov dword [esp + 0xa0], edi
call fcn.0050e151
movzx ecx, ax
lea eax, [esi + 6]
mov esi, dword [esp + 0xb4]
sub ebx, ecx
mov dword [esp + 0xa8], eax
sub ebx, edi
add eax, ebp
mov dword [esp + 0x20], ecx
mov dword [esp + 0xac], eax
sub ebx, ebp
add eax, edi
sub ebx, 6
mov edi, dword [esp + 0xc4]
mov dword [esp + 0xa4], eax
mov eax, dword [esp + 0xb8]
add eax, 3
mov dword [esp + 0x24], ebx
shr eax, 2
push edi
lea ecx, [eax + esi]
lea edx, [ecx + eax]
mov dword [esp + 0x90], ecx
add eax, edx
mov dword [esp + 0x94], edx
mov ebx, ecx
mov dword [esp + 0x2c], eax
mov ebp, edx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebp
mov dword [esp + 0x3c], eax
call fcn.0050707e
shr eax, 0x10
add esp, 0x10
movzx eax, al
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0xb4]
mov dword [esp + 0x88], 1
cmp dword [esp + 0x18], eax
ja 0x50b44d
mov eax, dword [esp + 0x8c]
cmp dword [esp + 0x1c], eax
ja 0x50b44d
cmp dword [esp + 0xac], 6
jb 0x50b44d
push dword [esp + 0x90]
lea eax, [esp + 0x70]
push dword [esp + 0xa0]
push eax
call fcn.0050a70e
add esp, 0xc
cmp eax, 0xffffff88
ja 0x50bffb
push dword [esp + 0x94]
lea eax, [esp + 0x5c]
push dword [esp + 0xa4]
push eax
call fcn.0050a70e
add esp, 0xc
cmp eax, 0xffffff88
ja 0x50bffb
push dword [esp + 0x14]
lea eax, [esp + 0x48]
push dword [esp + 0x9c]
push eax
call fcn.0050a70e
add esp, 0xc
cmp eax, 0xffffff88
ja 0x50bffb
push dword [esp + 0x18]
mov eax, dword [esp + 0x18]
add eax, dword [esp + 0x9c]
push eax
lea eax, [esp + 0x38]
push eax
call fcn.0050a70e
add esp, 0xc
cmp eax, 0xffffff88
ja 0x50bffb
mov eax, dword [esp + 0x8c]
mov ecx, dword [esp + 0x1c]
sub eax, ecx
cmp eax, 4
jb 0x50b435
cmp ecx, dword [esp + 0x10]
jae 0x50b435
mov eax, dword [esp + 0x28]
neg eax
and eax, 0x1f
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x6c]
and ecx, 0x1f
shl edx, cl
mov ecx, eax
shr edx, cl
mov ecx, dword [esp + 0xa8]
mov esi, dword [esp + 0x34]
mov al, byte [edi + edx*2 + 5]
movzx ebp, byte [edi + edx*2 + 4]
mov byte [ecx], al
add ebp, dword [esp + 0x70]
inc ecx
mov edx, dword [esp + 0x58]
mov dword [esp + 0xa8], ecx
mov ecx, dword [esp + 0x5c]
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 0x14]
shr edx, cl
mov ecx, dword [esp + 0x20]
movzx ebx, byte [edi + edx*2 + 4]
mov al, byte [edi + edx*2 + 5]
add ebx, dword [esp + 0x5c]
mov byte [ecx], al
inc ecx
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0xb8]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x48]
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 0x14]
shr edx, cl
mov ecx, dword [esp + 0x24]
mov al, byte [eax + edx*2 + 5]
movzx edi, byte [edi + edx*2 + 4]
add edi, dword [esp + 0x48]
mov edx, dword [esp + 0x30]
mov byte [ecx], al
inc ecx
mov dword [esp + 0x24], ecx
mov ecx, esi
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 0x14]
shr edx, cl
mov ecx, dword [esp + 0xb8]
movzx eax, byte [ecx + edx*2 + 4]
add esi, eax
mov al, byte [ecx + edx*2 + 5]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x6c]
mov byte [ecx], al
inc ecx
mov eax, dword [esp + 0xb8]
mov dword [esp + 0x2c], ecx
mov ecx, ebp
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 0x14]
shr edx, cl
mov ecx, dword [esp + 0xa8]
movzx eax, byte [eax + edx*2 + 4]
add eax, ebp
mov ebp, dword [esp + 0xb8]
mov dword [esp + 0x70], eax
mov al, byte [ebp + edx*2 + 5]
mov edx, dword [esp + 0x58]
mov byte [ecx], al
inc ecx
mov dword [esp + 0xa8], ecx
mov ecx, ebx
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 0x14]
shr edx, cl
movzx eax, byte [ebp + edx*2 + 4]
add eax, ebx
mov dword [esp + 0x5c], eax
mov al, byte [ebp + edx*2 + 5]
mov edx, dword [esp + 0x44]
mov ecx, edi
mov ebx, dword [esp + 0x20]
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 0x14]
shr edx, cl
mov ecx, dword [esp + 0x24]
mov byte [ebx], al
inc ebx
mov dword [esp + 0x20], ebx
movzx eax, byte [ebp + edx*2 + 4]
add eax, edi
mov dword [esp + 0x48], eax
mov al, byte [ebp + edx*2 + 5]
mov edx, dword [esp + 0x30]
mov byte [ecx], al
inc ecx
mov dword [esp + 0x24], ecx
mov ecx, esi
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 0x14]
shr edx, cl
movzx eax, byte [ebp + edx*2 + 4]
add eax, esi
mov dword [esp + 0x34], eax
mov al, byte [ebp + edx*2 + 5]
mov ebp, dword [esp + 0x2c]
mov byte [ebp], al
lea eax, [esp + 0x6c]
inc ebp
push eax
mov dword [esp + 0x30], ebp
call fcn.0050a828
xor esi, esi
test eax, eax
lea eax, [esp + 0x5c]
cmove esi, dword [esp + 0x8c]
push eax
call fcn.0050a828
neg eax
sbb edi, edi
lea eax, [esp + 0x4c]
inc edi
push eax
and edi, esi
call fcn.0050a828
xor esi, esi
test eax, eax
lea eax, [esp + 0x3c]
push eax
cmove esi, edi
call fcn.0050a828
mov edi, dword [esp + 0xc8]
add esp, 0x10
neg eax
sbb eax, eax
inc eax
and esi, eax
cmp ebp, dword [esp + 0x10]
mov dword [esp + 0x88], esi
sbb eax, eax
test esi, eax
mov eax, dword [esp + 0x14]
jne 0x50b23b
mov esi, dword [esp + 0xa8]
mov ebp, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x80]
cmp esi, edx
ja 0x50b44d
cmp ebx, dword [esp + 0x84]
ja 0x50b44d
cmp ebp, ecx
jbe 0x50b455
push 0xffffffffffffffec
pop eax
jmp 0x50bffb
mov ebp, dword [esp + 0x70]
mov eax, edx
sub eax, esi
push 0x20
cmp eax, 3
jle 0x50b5a1
lea ebx, [edx - 3]
mov dword [esp + 0x98], ebx
pop ebx
cmp ebp, ebx
jbe 0x50b484
mov dword [esp + 0x18], 3
jmp 0x50b50f
mov ecx, dword [esp + 0x74]
cmp ecx, dword [esp + 0x7c]
jb 0x50b49f
lea eax, [esp + 0x6c]
push eax
call fcn.0050a828
pop ecx
mov dword [esp + 0x18], eax
jmp 0x50b50b
mov edx, dword [esp + 0x78]
cmp ecx, edx
jne 0x50b4b4
cmp ebp, ebx
sbb eax, eax
add eax, 2
mov dword [esp + 0x18], eax
jmp 0x50b50f
and dword [esp + 0x18], 0
mov eax, ebp
shr eax, 3
mov dword [esp + 0x10], eax
mov eax, ecx
sub eax, dword [esp + 0x10]
cmp eax, edx
jae 0x50b4da
mov eax, ecx
mov dword [esp + 0x18], 1
sub eax, edx
jmp 0x50b4de
mov eax, dword [esp + 0x10]
sub ecx, eax
imul eax, eax, 0xfffffff8
push 4
push ecx
mov dword [esp + 0x7c], ecx
add ebp, eax
lea eax, [esp + 0xa8]
push eax
mov dword [esp + 0x7c], ebp
call fcn.005282a0
mov eax, dword [esp + 0xac]
add esp, 0xc
mov dword [esp + 0x6c], eax
mov ebp, dword [esp + 0x70]
cmp esi, dword [esp + 0x94]
sbb ecx, ecx
xor eax, eax
neg ecx
cmp dword [esp + 0x18], eax
sete al
test eax, ecx
je 0x50b613
mov edi, dword [esp + 0x28]
mov ecx, ebp
mov ebx, dword [esp + 0x6c]
and ecx, 0x1f
neg edi
mov edx, ebx
shl edx, cl
and edi, 0x1f
mov ecx, edi
shr edx, cl
mov ecx, dword [esp + 0xb8]
push 0x20
movzx esi, byte [ecx + edx*2 + 4]
mov al, byte [ecx + edx*2 + 5]
add esi, ebp
mov ecx, dword [esp + 0xac]
mov byte [ecx], al
inc ecx
mov dword [esp + 0xac], ecx
mov ecx, esi
and ecx, 0x1f
shl ebx, cl
mov ecx, edi
mov edi, dword [esp + 0xbc]
shr ebx, cl
movzx ebp, byte [edi + ebx*2 + 4]
mov al, byte [edi + ebx*2 + 5]
add ebp, esi
mov esi, dword [esp + 0xac]
mov dword [esp + 0x74], ebp
mov byte [esi], al
inc esi
mov dword [esp + 0xac], esi
jmp 0x50b472
mov ecx, dword [esp + 0x78]
pop ebx
cmp ebp, ebx
ja 0x50b617
cmp ecx, dword [esp + 0x7c]
jb 0x50b5bd
lea eax, [esp + 0x6c]
push eax
call fcn.0050a828
pop ecx
jmp 0x50b60f
mov edx, dword [esp + 0x78]
cmp ecx, edx
je 0x50b61b
mov eax, ebp
shr eax, 3
mov dword [esp + 0x10], eax
mov eax, ecx
sub eax, dword [esp + 0x10]
cmp eax, edx
jae 0x50b5de
mov eax, ecx
sub eax, edx
jmp 0x50b5e2
mov eax, dword [esp + 0x10]
sub ecx, eax
imul eax, eax, 0xfffffff8
push 4
push ecx
mov dword [esp + 0x7c], ecx
add ebp, eax
lea eax, [esp + 0x9c]
push eax
mov dword [esp + 0x7c], ebp
call fcn.005282a0
mov eax, dword [esp + 0xa0]
add esp, 0xc
mov dword [esp + 0x6c], eax
mov ebp, dword [esp + 0x70]
mov ecx, dword [esp + 0x74]
mov edx, dword [esp + 0x78]
cmp ebp, ebx
jbe 0x50b62c
mov dword [esp + 0x14], 3
jmp 0x50b6be
cmp ecx, dword [esp + 0x7c]
jb 0x50b643
lea eax, [esp + 0x6c]
push eax
call fcn.0050a828
pop ecx
mov dword [esp + 0x14], eax
jmp 0x50b6ba
cmp ecx, edx
jne 0x50b663
mov edx, dword [esp + 0x28]
cmp ebp, ebx
jae 0x50b659
mov dword [esp + 0x14], 1
jmp 0x50b6c2
mov dword [esp + 0x14], 2
jmp 0x50b6c2
and dword [esp + 0x14], 0
mov eax, ebp
shr eax, 3
mov dword [esp + 0x10], eax
mov eax, ecx
sub eax, dword [esp + 0x10]
cmp eax, edx
jae 0x50b689
mov eax, ecx
mov dword [esp + 0x14], 1
sub eax, edx
jmp 0x50b68d
mov eax, dword [esp + 0x10]
sub ecx, eax
imul eax, eax, 0xfffffff8
push 4
push ecx
mov dword [esp + 0x7c], ecx
add ebp, eax
lea eax, [esp + 0xa4]
push eax
mov dword [esp + 0x7c], ebp
call fcn.005282a0
mov eax, dword [esp + 0xa8]
add esp, 0xc
mov dword [esp + 0x6c], eax
mov ebp, dword [esp + 0x70]
mov edx, dword [esp + 0x28]
neg edx
cmp esi, dword [esp + 0x80]
mov dword [esp + 0x18], edx
sbb ecx, ecx
xor eax, eax
neg ecx
cmp dword [esp + 0x14], eax
sete al
test eax, ecx
je 0x50b70d
mov edx, dword [esp + 0x6c]
mov ecx, ebp
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 0x28]
neg ecx
and ecx, 0x1f
shr edx, cl
movzx eax, byte [edi + edx*2 + 4]
add ebp, eax
mov al, byte [edi + edx*2 + 5]
mov byte [esi], al
inc esi
mov dword [esp + 0x70], ebp
jmp 0x50b613
cmp esi, dword [esp + 0x80]
jae 0x50b758
mov ebx, dword [esp + 0x80]
mov eax, edx
and eax, 0x1f
mov dword [esp + 0x90], eax
mov edx, dword [esp + 0x6c]
mov ecx, ebp
and ecx, 0x1f
shl edx, cl
mov ecx, eax
shr edx, cl
movzx eax, byte [edi + edx*2 + 4]
add ebp, eax
mov al, byte [edi + edx*2 + 5]
mov byte [esi], al
inc esi
mov eax, dword [esp + 0x90]
cmp esi, ebx
jb 0x50b729
push 0x20
mov dword [esp + 0x74], ebp
pop ebx
mov ecx, dword [esp + 0x84]
mov eax, ecx
mov esi, dword [esp + 0x20]
sub eax, esi
cmp eax, 3
jle 0x50b8a1
lea ebp, [ecx - 3]
mov dword [esp + 0x88], ebp
mov ebp, dword [esp + 0x5c]
cmp ebp, ebx
jbe 0x50b78f
mov dword [esp + 0x14], 3
jmp 0x50b81a
mov ecx, dword [esp + 0x60]
cmp ecx, dword [esp + 0x68]
jb 0x50b7aa
lea eax, [esp + 0x58]
push eax
call fcn.0050a828
pop ecx
mov dword [esp + 0x14], eax
jmp 0x50b816
mov edx, dword [esp + 0x64]
cmp ecx, edx
jne 0x50b7bf
cmp ebp, ebx
sbb eax, eax
add eax, 2
mov dword [esp + 0x14], eax
jmp 0x50b81a
and dword [esp + 0x14], 0
mov eax, ebp
shr eax, 3
mov dword [esp + 0x10], eax
mov eax, ecx
sub eax, dword [esp + 0x10]
cmp eax, edx
jae 0x50b7e5
mov eax, ecx
mov dword [esp + 0x14], 1
sub eax, edx
jmp 0x50b7e9
mov eax, dword [esp + 0x10]
sub ecx, eax
imul eax, eax, 0xfffffff8
push 4
push ecx
mov dword [esp + 0x68], ecx
add ebp, eax
lea eax, [esp + 0x98]
push eax
mov dword [esp + 0x68], ebp
call fcn.005282a0
mov eax, dword [esp + 0x9c]
add esp, 0xc
mov dword [esp + 0x58], eax
mov ebp, dword [esp + 0x5c]
cmp esi, dword [esp + 0x88]
sbb ecx, ecx
xor eax, eax
neg ecx
cmp dword [esp + 0x14], eax
sete al
test eax, ecx
je 0x50b916
mov edi, dword [esp + 0x28]
mov ecx, ebp
mov ebx, dword [esp + 0x58]
and ecx, 0x1f
neg edi
mov edx, ebx
shl edx, cl
and edi, 0x1f
mov ecx, edi
shr edx, cl
mov ecx, dword [esp + 0xb8]
push 0x20
movzx esi, byte [ecx + edx*2 + 4]
mov al, byte [ecx + edx*2 + 5]
add esi, ebp
mov ecx, dword [esp + 0x24]
mov byte [ecx], al
inc ecx
mov dword [esp + 0x24], ecx
mov ecx, esi
and ecx, 0x1f
shl ebx, cl
mov ecx, edi
mov edi, dword [esp + 0xbc]
shr ebx, cl
movzx ebp, byte [edi + ebx*2 + 4]
mov al, byte [edi + ebx*2 + 5]
add ebp, esi
mov esi, dword [esp + 0x24]
mov dword [esp + 0x60], ebp
pop ebx
mov byte [esi], al
inc esi
mov dword [esp + 0x20], esi
jmp 0x50b77e
mov ebp, dword [esp + 0x5c]
mov ecx, dword [esp + 0x60]
cmp ebp, ebx
ja 0x50b91a
cmp ecx, dword [esp + 0x68]
jb 0x50b8c0
lea eax, [esp + 0x58]
push eax
call fcn.0050a828
pop ecx
jmp 0x50b912
mov edx, dword [esp + 0x64]
cmp ecx, edx
je 0x50b91e
mov eax, ebp
shr eax, 3
mov dword [esp + 0x10], eax
mov eax, ecx
sub eax, dword [esp + 0x10]
cmp eax, edx
jae 0x50b8e1
mov eax, ecx
sub eax, edx
jmp 0x50b8e5
mov eax, dword [esp + 0x10]
sub ecx, eax
imul eax, eax, 0xfffffff8
push 4
push ecx
mov dword [esp + 0x68], ecx
add ebp, eax
lea eax, [esp + 0x90]
push eax
mov dword [esp + 0x68], ebp
call fcn.005282a0
mov eax, dword [esp + 0x94]
add esp, 0xc
mov dword [esp + 0x58], eax
mov ebp, dword [esp + 0x5c]
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x64]
cmp ebp, ebx
jbe 0x50b92f
mov dword [esp + 0x14], 3
jmp 0x50b9c4
cmp ecx, dword [esp + 0x68]
jb 0x50b946
lea eax, [esp + 0x58]
push eax
call fcn.0050a828
pop ecx
mov dword [esp + 0x14], eax
jmp 0x50b9c0
cmp ecx, edx
jne 0x50b969
mov eax, dword [esp + 0x18]
push 0x1f
pop ecx
cmp ebp, ebx
jae 0x50b95f
mov dword [esp + 0x14], 1
jmp 0x50b9cb
mov dword [esp + 0x14], 2
jmp 0x50b9cb
and dword [esp + 0x14], 0
mov eax, ebp
shr eax, 3
mov dword [esp + 0x10], eax
mov eax, ecx
sub eax, dword [esp + 0x10]
cmp eax, edx
jae 0x50b98f
mov eax, ecx
mov dword [esp + 0x14], 1
sub eax, edx
jmp 0x50b993
mov eax, dword [esp + 0x10]
sub ecx, eax
imul eax, eax, 0xfffffff8
push 4
push ecx
mov dword [esp + 0x68], ecx
add ebp, eax
lea eax, [esp + 0xa0]
push eax
mov dword [esp + 0x68], ebp
call fcn.005282a0
mov eax, dword [esp + 0xa4]
add esp, 0xc
mov dword [esp + 0x58], eax
mov ebp, dword [esp + 0x5c]
mov eax, dword [esp + 0x18]
push 0x1f
pop ecx
mov edx, dword [esp + 0x84]
and eax, ecx
cmp esi, edx
mov dword [esp + 0x20], eax
sbb ecx, ecx
xor eax, eax
neg ecx
cmp dword [esp + 0x14], eax
sete al
test eax, ecx
je 0x50ba16
mov edx, dword [esp + 0x58]
mov ecx, ebp
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 0x18]
and ecx, 0x1f
shr edx, cl
movzx eax, byte [edi + edx*2 + 4]
add ebp, eax
mov al, byte [edi + edx*2 + 5]
mov byte [esi], al
inc esi
mov dword [esp + 0x5c], ebp
jmp 0x50b916
cmp esi, edx
jae 0x50ba4b
mov ebx, dword [esp + 0x20]
mov edx, dword [esp + 0x58]
mov ecx, ebp
and ecx, 0x1f
shl edx, cl
mov ecx, ebx
shr edx, cl
movzx eax, byte [edi + edx*2 + 4]
add ebp, eax
mov al, byte [edi + edx*2 + 5]
mov byte [esi], al
inc esi
cmp esi, dword [esp + 0x84]
jb 0x50ba1e
push 0x20
mov dword [esp + 0x60], ebp
pop ebx
mov ecx, dword [esp + 0x1c]
mov eax, ecx
mov esi, dword [esp + 0x24]
sub eax, esi
cmp eax, 3
jle 0x50bb91
lea ebp, [ecx - 3]
mov dword [esp + 0x80], ebp
mov ebp, dword [esp + 0x48]
cmp ebp, ebx
jbe 0x50ba7f
mov dword [esp + 0x18], 3
jmp 0x50bb0a
mov ecx, dword [esp + 0x4c]
cmp ecx, dword [esp + 0x54]
jb 0x50ba9a
lea eax, [esp + 0x44]
push eax
call fcn.0050a828
pop ecx
mov dword [esp + 0x18], eax
jmp 0x50bb06
mov edx, dword [esp + 0x50]
cmp ecx, edx
jne 0x50baaf
cmp ebp, ebx
sbb eax, eax
add eax, 2
mov dword [esp + 0x18], eax
jmp 0x50bb0a
and dword [esp + 0x18], 0
mov eax, ebp
shr eax, 3
mov dword [esp + 0x10], eax
mov eax, ecx
sub eax, dword [esp + 0x10]
cmp eax, edx
jae 0x50bad5
mov eax, ecx
mov dword [esp + 0x18], 1
sub eax, edx
jmp 0x50bad9
mov eax, dword [esp + 0x10]
sub ecx, eax
imul eax, eax, 0xfffffff8
push 4
push ecx
mov dword [esp + 0x54], ecx
add ebp, eax
lea eax, [esp + 0x8c]
push eax
mov dword [esp + 0x54], ebp
call fcn.005282a0
mov eax, dword [esp + 0x90]
add esp, 0xc
mov dword [esp + 0x44], eax
mov ebp, dword [esp + 0x48]
cmp esi, dword [esp + 0x80]
sbb ecx, ecx
xor eax, eax
neg ecx
cmp dword [esp + 0x18], eax
sete al
test eax, ecx
je 0x50bc06
mov edi, dword [esp + 0x28]
mov ecx, ebp
mov ebx, dword [esp + 0x44]
and ecx, 0x1f
neg edi
mov edx, ebx
shl edx, cl
and edi, 0x1f
mov ecx, edi
shr edx, cl
mov ecx, dword [esp + 0xb8]
push 0x20
movzx esi, byte [ecx + edx*2 + 4]
mov al, byte [ecx + edx*2 + 5]
add esi, ebp
mov ecx, dword [esp + 0x28]
mov byte [ecx], al
inc ecx
mov dword [esp + 0x28], ecx
mov ecx, esi
and ecx, 0x1f
shl ebx, cl
mov ecx, edi
mov edi, dword [esp + 0xbc]
shr ebx, cl
movzx ebp, byte [edi + ebx*2 + 4]
mov al, byte [edi + ebx*2 + 5]
add ebp, esi
mov esi, dword [esp + 0x28]
mov dword [esp + 0x4c], ebp
pop ebx
mov byte [esi], al
inc esi
mov dword [esp + 0x24], esi
jmp 0x50ba6e
mov ebp, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
cmp ebp, ebx
ja 0x50bc0a
cmp ecx, dword [esp + 0x54]
jb 0x50bbb0
lea eax, [esp + 0x44]
push eax
call fcn.0050a828
pop ecx
jmp 0x50bc02
mov edx, dword [esp + 0x50]
cmp ecx, edx
je 0x50bc0e
mov eax, ebp
shr eax, 3
mov dword [esp + 0x10], eax
mov eax, ecx
sub eax, dword [esp + 0x10]
cmp eax, edx
jae 0x50bbd1
mov eax, ecx
sub eax, edx
jmp 0x50bbd5
mov eax, dword [esp + 0x10]
sub ecx, eax
imul eax, eax, 0xfffffff8
push 4
push ecx
mov dword [esp + 0x54], ecx
add ebp, eax
lea eax, [esp + 0x88]
push eax
mov dword [esp + 0x54], ebp
call fcn.005282a0
mov eax, dword [esp + 0x8c]
add esp, 0xc
mov dword [esp + 0x44], eax
mov ebp, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x50]
cmp ebp, ebx
jbe 0x50bc1c
mov dword [esp + 0x18], 3
jmp 0x50bc99
cmp ecx, dword [esp + 0x54]
jb 0x50bc33
lea eax, [esp + 0x44]
push eax
call fcn.0050a828
pop ecx
mov dword [esp + 0x18], eax
jmp 0x50bc95
cmp ecx, edx
jne 0x50bc44
cmp ebp, ebx
sbb eax, eax
add eax, 2
mov dword [esp + 0x18], eax
jmp 0x50bc99
and dword [esp + 0x18], 0
mov eax, ebp
shr eax, 3
mov dword [esp + 0x10], eax
mov eax, ecx
sub eax, dword [esp + 0x10]
cmp eax, edx
jae 0x50bc6a
mov eax, ecx
mov dword [esp + 0x18], 1
sub eax, edx
jmp 0x50bc6e
mov eax, dword [esp + 0x10]
sub ecx, eax
imul eax, eax, 0xfffffff8
push 4
push ecx
mov dword [esp + 0x54], ecx
add ebp, eax
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x54], ebp
call fcn.005282a0
mov eax, dword [esp + 0x20]
add esp, 0xc
mov dword [esp + 0x44], eax
mov ebp, dword [esp + 0x48]
mov edx, dword [esp + 0x1c]
cmp esi, edx
sbb ecx, ecx
xor eax, eax
neg ecx
cmp dword [esp + 0x18], eax
sete al
test eax, ecx
je 0x50bcd8
mov edx, dword [esp + 0x44]
mov ecx, ebp
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 0x20]
shr edx, cl
movzx eax, byte [edi + edx*2 + 4]
add ebp, eax
mov al, byte [edi + edx*2 + 5]
mov byte [esi], al
inc esi
mov dword [esp + 0x48], ebp
jmp 0x50bc06
cmp esi, edx
jae 0x50bd0a
mov ebx, dword [esp + 0x20]
mov edx, dword [esp + 0x44]
mov ecx, ebp
and ecx, 0x1f
shl edx, cl
mov ecx, ebx
shr edx, cl
movzx eax, byte [edi + edx*2 + 4]
add ebp, eax
mov al, byte [edi + edx*2 + 5]
mov byte [esi], al
inc esi
cmp esi, dword [esp + 0x1c]
jb 0x50bce0
push 0x20
mov dword [esp + 0x4c], ebp
pop ebx
mov ecx, dword [esp + 0x8c]
mov eax, ecx
mov esi, dword [esp + 0x2c]
sub eax, esi
cmp eax, 3
jle 0x50be47
lea ebp, [ecx - 3]
mov dword [esp + 0x24], ebp
mov ebp, dword [esp + 0x34]
cmp ebp, ebx
jbe 0x50bd3e
mov dword [esp + 0x1c], 3
jmp 0x50bdc3
mov ecx, dword [esp + 0x38]
cmp ecx, dword [esp + 0x40]
jb 0x50bd59
lea eax, [esp + 0x30]
push eax
call fcn.0050a828
pop ecx
mov dword [esp + 0x1c], eax
jmp 0x50bdbf
mov edx, dword [esp + 0x3c]
cmp ecx, edx
jne 0x50bd6e
cmp ebp, ebx
sbb eax, eax
add eax, 2
mov dword [esp + 0x1c], eax
jmp 0x50bdc3
and dword [esp + 0x1c], 0
mov eax, ebp
shr eax, 3
mov dword [esp + 0x10], eax
mov eax, ecx
sub eax, dword [esp + 0x10]
cmp eax, edx
jae 0x50bd94
mov eax, ecx
mov dword [esp + 0x1c], 1
sub eax, edx
jmp 0x50bd98
mov eax, dword [esp + 0x10]
sub ecx, eax
imul eax, eax, 0xfffffff8
push 4
push ecx
mov dword [esp + 0x40], ecx
add ebp, eax
lea eax, [esp + 0x20]
push eax
mov dword [esp + 0x40], ebp
call fcn.005282a0
mov eax, dword [esp + 0x24]
add esp, 0xc
mov dword [esp + 0x30], eax
mov ebp, dword [esp + 0x34]
cmp esi, dword [esp + 0x24]
sbb ecx, ecx
xor eax, eax
neg ecx
cmp dword [esp + 0x1c], eax
sete al
test eax, ecx
je 0x50beb6
mov edi, dword [esp + 0x28]
mov ecx, ebp
mov ebx, dword [esp + 0x30]
and ecx, 0x1f
neg edi
mov edx, ebx
shl edx, cl
and edi, 0x1f
mov ecx, edi
shr edx, cl
mov ecx, dword [esp + 0xb8]
push 0x20
movzx esi, byte [ecx + edx*2 + 4]
mov al, byte [ecx + edx*2 + 5]
add esi, ebp
mov ecx, dword [esp + 0x30]
mov byte [ecx], al
inc ecx
mov dword [esp + 0x30], ecx
mov ecx, esi
and ecx, 0x1f
shl ebx, cl
mov ecx, edi
mov edi, dword [esp + 0xbc]
shr ebx, cl
movzx ebp, byte [edi + ebx*2 + 4]
mov al, byte [edi + ebx*2 + 5]
add ebp, esi
mov esi, dword [esp + 0x30]
mov dword [esp + 0x38], ebp
pop ebx
mov byte [esi], al
inc esi
mov dword [esp + 0x2c], esi
jmp 0x50bd2d
mov ebp, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
cmp ebp, ebx
ja 0x50beba
cmp ecx, dword [esp + 0x40]
jb 0x50be66
lea eax, [esp + 0x30]
push eax
call fcn.0050a828
pop ecx
jmp 0x50beb2
mov edx, dword [esp + 0x3c]
cmp ecx, edx
je 0x50bebe
mov eax, ebp
shr eax, 3
mov dword [esp + 0x10], eax
mov eax, ecx
sub eax, dword [esp + 0x10]
cmp eax, edx
jae 0x50be87
mov eax, ecx
sub eax, edx
jmp 0x50be8b
mov eax, dword [esp + 0x10]
sub ecx, eax
imul eax, eax, 0xfffffff8
push 4
push ecx
mov dword [esp + 0x40], ecx
add ebp, eax
lea eax, [esp + 0x34]
push eax
mov dword [esp + 0x40], ebp
call fcn.005282a0
mov eax, dword [esp + 0x38]
add esp, 0xc
mov dword [esp + 0x30], eax
mov ebp, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
cmp ebp, ebx
jbe 0x50becc
mov dword [esp + 0x1c], 3
jmp 0x50bf49
cmp ecx, dword [esp + 0x40]
jb 0x50bee3
lea eax, [esp + 0x30]
push eax
call fcn.0050a828
pop ecx
mov dword [esp + 0x1c], eax
jmp 0x50bf45
cmp ecx, edx
jne 0x50bef4
cmp ebp, ebx
sbb eax, eax
add eax, 2
mov dword [esp + 0x1c], eax
jmp 0x50bf49
and dword [esp + 0x1c], 0
mov eax, ebp
shr eax, 3
mov dword [esp + 0x10], eax
mov eax, ecx
sub eax, dword [esp + 0x10]
cmp eax, edx
jae 0x50bf1a
mov eax, ecx
mov dword [esp + 0x1c], 1
sub eax, edx
jmp 0x50bf1e
mov eax, dword [esp + 0x10]
sub ecx, eax
imul eax, eax, 0xfffffff8
push 4
push ecx
mov dword [esp + 0x40], ecx
add ebp, eax
lea eax, [esp + 0x2c]
push eax
mov dword [esp + 0x40], ebp
call fcn.005282a0
mov eax, dword [esp + 0x30]
add esp, 0xc
mov dword [esp + 0x30], eax
mov ebp, dword [esp + 0x34]
mov edx, dword [esp + 0x8c]
cmp esi, edx
sbb ecx, ecx
xor eax, eax
neg ecx
cmp dword [esp + 0x1c], eax
sete al
test eax, ecx
je 0x50bf8b
mov edx, dword [esp + 0x30]
mov ecx, ebp
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 0x20]
shr edx, cl
movzx eax, byte [edi + edx*2 + 4]
add ebp, eax
mov al, byte [edi + edx*2 + 5]
mov byte [esi], al
inc esi
mov dword [esp + 0x34], ebp
jmp 0x50beb6
cmp esi, edx
jae 0x50bfbb
mov edx, dword [esp + 0x30]
mov ecx, ebp
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 0x20]
shr edx, cl
movzx eax, byte [edi + edx*2 + 4]
add ebp, eax
mov al, byte [edi + edx*2 + 5]
mov byte [esi], al
inc esi
cmp esi, dword [esp + 0x8c]
jb 0x50bf8f
mov dword [esp + 0x34], ebp
lea eax, [esp + 0x30]
push eax
call fcn.0050a6f5
mov edx, eax
lea eax, [esp + 0x48]
push eax
call fcn.0050a6f5
and edx, eax
lea eax, [esp + 0x60]
push eax
call fcn.0050a6f5
and edx, eax
lea eax, [esp + 0x78]
push eax
call fcn.0050a6f5
add esp, 0x10
test eax, edx
mov eax, dword [esp + 0xac]
push 0xffffffffffffffec
pop ecx
cmove eax, ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x94
ret