Function at 0x819040
Capabilities:
Encode data using xor

Disassembly:
cmp byte [ecx + 0xc7], 2
jne 0x819438
push ebp
push ebx
push edi
push esi
sub esp, 0xc
mov eax, dword [esp + 0x20]
mov ebx, edx
mov esi, ecx
mov edi, 0xc26bc0
mov edx, 0xc26bbf
test eax, eax
je 0x819082
cmp byte [ebx + 0x24], 0
jns 0x81907b
mov ecx, dword [eax + 0x38]
and ecx, 3
cmp ecx, 2
je 0x819082
mov edx, dword [eax]
mov edi, 0xbba260
mov eax, 0x799120
mov ebp, 3
mov dword [esp + 8], edx
sub ebp, eax
movzx ecx, byte [0xbba27b]
mov eax, ebp
xor eax, 0x799120
sete al
not al
add al, 0x30
and al, 7
movzx eax, al
bt ecx, eax
jb 0x81924a
mov al, byte [0xbba27b]
mov ecx, ebp
mov ah, 1
xor ecx, 0x799120
sete cl
not cl
add cl, 0x30
and cl, 7
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbba27b], ah
jne 0x8190ba
mov ebp, 0x799120
mov ecx, 3
sub ecx, ebp
mov ebp, ecx
xor ebp, 0x799120
sete ah
not ah
add ah, 0x30
and ah, 7
xor ah, 7
movzx ebp, ah
movzx eax, al
bt eax, ebp
jae 0x819131
mov eax, ecx
movzx ebp, byte [0xbba27b]
xor eax, 0x799120
sete al
not al
add al, 0x30
and al, 7
movzx eax, al
bt ebp, eax
jae 0x81910d
jmp 0x81924a
xor ecx, 0x799120
movzx ecx, byte [0xbba27b]
sete al
not al
add al, 0x30
and al, 7
movzx eax, al
bt ecx, eax
jb 0x819220
mov eax, 0x799120
mov ebp, 3
xor ecx, ecx
mov edx, ebx
mov dword [esp], edi
sub ebp, eax
mov eax, dword [0xbba260]
xor ebp, 0x799120
sete cl
xor ecx, 0xec3343e7
add ecx, 0x1030
mov ebp, ecx
xor eax, ecx
shr ebp, 0x1f
mov dword [0xbba260], eax
not eax
or ebp, ecx
and cl, 7
imul ebp, eax
mov eax, dword [0xbba264]
mov ebx, ebp
lea edi, [ebp + ebp]
shr ebx, 0x1e
or edi, ebx
xor eax, ebp
mov dword [0xbba264], eax
not eax
imul eax, edi
mov edi, dword [0xbba268]
lea ebx, [eax*4]
xor edi, eax
shr eax, 0x1d
mov dword [0xbba268], edi
or ebx, eax
not edi
mov eax, dword [0xbba26c]
imul edi, ebx
lea ebx, [edi*8]
xor eax, edi
shr edi, 0x1c
mov dword [0xbba26c], eax
or ebx, edi
not eax
mov edi, dword [0xbba270]
imul eax, ebx
mov ebx, eax
shl ebx, 4
xor edi, eax
shr eax, 0x1b
mov dword [0xbba270], edi
or eax, ebx
not edi
mov ebx, edx
mov dl, 1
imul edi, eax
shl dl, cl
xor dword [0xbba274], edi
mov edi, dword [esp]
or byte [0xbba27b], dl
mov eax, 0x799120
mov ecx, 3
sub ecx, eax
mov al, 0xfe
xor ecx, 0x799120
sete cl
not cl
add cl, 0x30
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbba27b], al
mov ebp, fcn.007946f0
xor eax, eax
movzx edx, byte [0xbba297]
and ebp, 1
inc ebp
mov ecx, ebp
xor ecx, fcn.007946f0
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 6]
and al, 7
movzx eax, al
bt edx, eax
jb 0x81941d
mov al, byte [0xbba297]
mov dword [esp], edi
mov dword [esp + 4], ebx
mov edi, ebp
xor ecx, ecx
mov ah, 1
xor edi, fcn.007946f0
sete cl
mov ebx, ecx
xor ebx, 1
lea ecx, [ecx + ebx*2 + 6]
and cl, 7
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbba297], ah
jne 0x81928a
mov ecx, fcn.007946f0
xor edx, edx
movzx eax, al
and ecx, 1
inc ecx
mov edi, ecx
xor edi, fcn.007946f0
sete dl
mov ebx, edx
xor ebx, 1
lea edx, [edx + ebx*2 + 6]
and dl, 7
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x819319
mov ebx, dword [esp + 4]
mov edi, dword [esp]
mov edx, ecx
xor eax, eax
movzx ebp, byte [0xbba297]
xor edx, fcn.007946f0
sete al
mov edx, eax
xor edx, 1
lea eax, [eax + edx*2 + 6]
and al, 7
movzx eax, al
bt ebp, eax
jae 0x8192ed
jmp 0x81941d
xor eax, eax
xor ecx, fcn.007946f0
movzx edx, byte [0xbba297]
mov ebx, dword [esp + 4]
mov edi, dword [esp]
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 6]
and al, 7
movzx eax, al
bt edx, eax
jb 0x8193f1
mov ecx, fcn.007946f0
xor eax, eax
and ecx, 1
inc ecx
xor ecx, fcn.007946f0
sete al
mov ecx, eax
not ecx
and ecx, 0x821
lea ecx, [eax + ecx*2 - 0x74e46d2a]
mov eax, dword [0xbba280]
mov edx, ecx
shr edx, 0x1f
or edx, ecx
xor eax, ecx
and cl, 7
mov dword [0xbba280], eax
not eax
imul edx, eax
mov eax, dword [str.U_N:_]
lea edi, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [str.U_N:_], eax
or edi, edx
not eax
mov edx, dword [0xbba288]
imul eax, edi
lea edi, [eax*4]
xor edx, eax
shr eax, 0x1d
mov dword [0xbba288], edx
or edi, eax
not edx
mov eax, dword [0xbba28c]
imul edx, edi
lea edi, [edx*8]
xor eax, edx
shr edx, 0x1c
mov dword [0xbba28c], eax
or edi, edx
not eax
mov dl, 1
imul eax, edi
mov edi, dword [esp]
shl dl, cl
xor dword [0xbba290], eax
or byte [0xbba297], dl
mov eax, fcn.007946f0
xor ecx, ecx
and eax, 1
inc eax
xor eax, fcn.007946f0
sete cl
mov eax, ecx
xor eax, 1
lea ecx, [ecx + eax*2 + 6]
mov al, 0xfe
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbba297], al
push dword [esp + 8]
push edi
push dword [ebx]
push 0xbba280
push 0
push esi
call fcn.007fdcc0
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret