Function at 0x838d90
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x18
mov eax, dword [0xbcbae0]
mov esi, edx
mov edx, fcn.0077c930
mov edi, ecx
imul edx, edx
and edx, 3
xor eax, esp
cmp edx, 2
mov dword [esp + 0x14], eax
sete al
movzx ecx, byte [0xbb5e33]
or al, 2
movzx eax, al
bt ecx, eax
jb 0x838ebe
mov al, byte [0xbb5e33]
cmp edx, 2
mov ah, 1
sete cl
or cl, 2
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb5e33], ah
jne 0x838dd1
mov ecx, fcn.0077c930
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 2
sete dl
or dl, 2
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x838e2b
cmp ecx, 2
movzx edx, byte [0xbb5e33]
sete al
or al, 2
movzx eax, al
bt edx, eax
jae 0x838e0f
jmp 0x838ebe
cmp ecx, 2
movzx edx, byte [0xbb5e33]
sete al
or al, 2
movzx eax, al
bt edx, eax
jb 0x838e9d
mov eax, fcn.0077c930
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 2
sete cl
mov eax, ecx
or cl, 2
or eax, 0xd506cee2
xor eax, dword [0xbb5e24]
mov dword [0xbb5e24], eax
not eax
mov edx, dword [0xbb5e28]
imul eax, eax, 0xd506cee3
lea ebx, [eax + eax]
xor edx, eax
shr eax, 0x1e
mov dword [0xbb5e28], edx
or ebx, eax
not edx
mov al, 1
imul edx, ebx
shl al, cl
xor dword [0xbb5e2c], edx
or byte [0xbb5e33], al
mov eax, fcn.0077c930
imul eax, eax
and eax, 3
cmp eax, 2
mov al, 0xfe
sete cl
or cl, 2
xor cl, 7
rol al, cl
and byte [0xbb5e33], al
lea eax, [esp + 0xc]
lea ecx, [esp + 0x10]
push eax
push ecx
push 0xbb5e24
push edi
call fcn.008397f0
add esp, 0x10
mov ebp, 1
cmp eax, 2
jne 0x8390e3
cmp byte [edi + 5], 0x3a
jne 0x839098
mov edx, fcn.007f1f60
xor eax, eax
movzx ebx, byte [0xbb5e3f]
imul edx, edx
and edx, 3
cmp edx, 3
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 2]
bt ebx, eax
jb 0x83901a
mov al, byte [0xbb5e3f]
xor ebx, ebx
cmp edx, 3
mov ah, 1
sete bl
mov ecx, ebx
xor ecx, 1
lea ecx, [ebx + ecx*2 + 2]
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb5e3f], ah
jne 0x838f1f
mov ecx, fcn.007f1f60
xor edx, edx
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 3
sete dl
mov ebx, edx
xor ebx, 1
lea edx, [edx + ebx*2 + 2]
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x838f8f
xor eax, eax
cmp ecx, 3
movzx ebx, byte [0xbb5e3f]
sete al
mov edx, eax
xor edx, 1
lea eax, [eax + edx*2 + 2]
bt ebx, eax
jae 0x838f6d
jmp 0x83901a
xor eax, eax
cmp ecx, 3
movzx edx, byte [0xbb5e3f]
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 2]
bt edx, eax
jb 0x838ff1
mov eax, fcn.007f1f60
xor ecx, ecx
mov ebx, dword [0xbb5e34]
mov dl, 1
imul eax, eax
and eax, 3
cmp eax, 3
sete cl
mov eax, ecx
xor eax, 0x11
lea ecx, [ecx + eax*2 + 0x3d052da2]
xor ebx, ecx
mov dword [0xbb5e34], ebx
not ebx
imul ebx, ecx
and cl, 7
shl dl, cl
xor dword [0xbb5e38], ebx
or byte [0xbb5e3f], dl
mov eax, fcn.007f1f60
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 3
sete cl
mov eax, ecx
xor eax, 1
lea ecx, [ecx + eax*2 + 2]
mov al, 0xfe
xor cl, 7
rol al, cl
and byte [0xbb5e3f], al
lea ecx, [esp + 8]
lea eax, [edi + 6]
push ecx
push 0xbb5e34
push eax
call fcn.008397f0
add esp, 0xc
cmp eax, 1
jne 0x8390e3
fldz
cmp byte [edi + 8], 0x2e
lea ecx, [edi + 8]
jne 0x8390a7
fstp st(0)
movzx eax, byte [edi + 9]
fldz
fld1
lea edx, [eax - 0x30]
cmp edx, 9
jbe 0x83905a
fstp st(0)
jmp 0x8390a7
fld dword [0xb4337c]
add edi, 9
mov ecx, edi
movsx eax, al
fmul st(2), st(0)
mov word [esp + 2], ax
fxch st(2)
fiadd word [esp + 2]
fadd dword [0xb43448]
fxch st(1)
fmul st(2)
movzx eax, byte [ecx + 1]
inc ecx
fxch st(1)
fxch st(2)
mov edx, eax
add edx, 0xffffffd0
cmp edx, 0xa
jb 0x839065
fstp st(0)
fdivp st(1)
jmp 0x8390a7
add edi, 5
mov dword [esp + 8], 0
fldz
mov ecx, edi
mov word [esi + 0x28], 0
mov byte [esi + 0x2b], 1
mov edx, esi
mov eax, dword [esp + 0x10]
mov dword [esi + 0x14], eax
mov eax, dword [esp + 0xc]
mov dword [esi + 0x18], eax
mov eax, dword [esp + 8]
mov dword [esp + 4], eax
fiadd dword [esp + 4]
fstp qword [esi + 0x20]
call fcn.008398b0
test eax, eax
jne 0x8390e3
cmp dword [esi + 0x1c], 0
setne byte [esi + 0x2c]
xor ebp, ebp
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.00980459
mov eax, ebp
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret