Function at 0x799320
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x70
mov eax, dword [0xbcbae0]
mov edi, 2
mov ebx, ecx
xor eax, ebp
mov dword [esp + 0x68], eax
movzx esi, byte [ecx + 0x2d]
sub edi, esi
inc esi
mov edx, esi
push edi
call fcn.007989c0
add esp, 4
test eax, eax
mov dword [esp], eax
jne 0x799922
mov dword [esp], esi
mov dword [esp + 0x28], edi
mov ecx, ebx
mov edx, 4
push 4
call fcn.007989c0
add esp, 4
test eax, eax
mov esi, ebx
je 0x79938b
mov edx, dword [esp]
mov ecx, esi
push dword [esp + 0x28]
mov dword [esp + 4], eax
jmp 0x79991a
mov dword [esi + 0x60], 0
mov dword [esi + 0x5c], 0
mov dword [esi + 0x58], 0
mov dword [esi + 0x54], 0
mov dword [esi + 0x50], 0
mov dword [esi + 0x4c], 0
mov dword [esi + 0x48], 0
mov dword [esi + 0x44], 0
mov dword [esi + 0x40], 0
mov dword [esi + 0x3c], 0
mov dword [esi + 0x38], 0
mov dword [esi + 0x34], 0
lea edx, [esp + 0x40]
mov ecx, dword [esi + 8]
call fcn.00799a90
mov edi, dword [esp]
test eax, eax
jne 0x7998fe
xor ebx, ebx
mov eax, dword [esp + 0x44]
cmp dword [esp + 0x40], 0x21
sbb eax, 0
jge 0x79940d
xor eax, eax
jmp 0x799681
mov ecx, dword [esi + 8]
lea edx, [esp + 0x48]
push 0
push 0
push 0x20
call fcn.00799aa0
add esp, 0xc
test eax, eax
jne 0x7998fe
lea ecx, [esp + 0x48]
call fcn.0055d990
lea ecx, [esp + 0x50]
mov ebx, eax
call fcn.0055d990
mov ecx, ebx
and ecx, 0xfffffffe
cmp ecx, 0x377f0682
je 0x799454
xor eax, eax
xor ebx, ebx
jmp 0x799681
lea ecx, [eax - 0x200]
cmp ecx, 0xfe00
ja 0x79944b
lea ecx, [eax - 1]
and ecx, eax
jne 0x79944b
and bl, 1
lea ecx, [esp + 0x54]
mov dword [esp + 8], eax
mov byte [esi + 0x41], bl
mov dword [esi + 0x24], eax
call fcn.0055d990
mov dword [esi + 0x70], eax
xor bl, 1
lea edx, [esp + 0x48]
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
mov dword [esi + 0x54], eax
lea eax, [esi + 0x4c]
mov dword [esi + 0x58], ecx
movzx ecx, bl
push eax
push 0
push 0x18
call fcn.00798210
add esp, 0xc
mov ebx, dword [esi + 0x4c]
lea ecx, [esp + 0x60]
call fcn.0055d990
cmp ebx, eax
jne 0x79944b
mov ebx, dword [esi + 0x50]
lea ecx, [esp + 0x64]
call fcn.0055d990
cmp ebx, eax
mov eax, 0
mov ebx, 0
jne 0x799681
lea ecx, [esp + 0x4c]
call fcn.0055d990
cmp eax, 0x2de218
je 0x7994fc
mov ecx, 0x6c9e
call fcn.00795040
mov eax, 0xe
jmp 0x7998fe
mov eax, dword [esp + 8]
lea eax, [eax + 0x18]
mov ebx, eax
sar ebx, 0x1f
push ebx
mov dword [esp + 0x18], eax
push eax
call fcn.00775630
add esp, 8
test eax, eax
mov dword [esp + 4], eax
jne 0x799528
mov eax, 7
jmp 0x7998fe
mov eax, dword [esp + 0x14]
mov ecx, ebx
mov edx, dword [esp + 0x44]
mov dword [esp + 0x30], ebx
mov ebx, 0
mov dword [esp + 0xc], 0
add eax, 0x20
adc ecx, 0
cmp dword [esp + 0x40], eax
sbb edx, ecx
jl 0x799671
mov edx, dword [esp + 4]
mov ebx, dword [esp + 8]
mov dword [esp + 0x1c], 0x20
mov dword [esp + 0xc], 0
mov dword [esp + 0x18], 0
add edx, 0x18
mov dword [esp + 0x2c], edx
mov edx, ebx
shr ebx, 0x10
and edx, 0xff00
or ebx, edx
xor edx, edx
mov dword [esp + 8], ebx
xor ebx, ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x1c]
mov ebx, dword [esp + 4]
mov dword [esp + 0x24], ecx
mov ecx, dword [esi + 8]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x10], edx
mov edx, ebx
push dword [esp + 0x34]
push dword [esp + 0x14]
push dword [esp + 0x1c]
call fcn.00799aa0
add esp, 0xc
test eax, eax
je 0x7995e2
mov ebx, eax
push dword [esp + 4]
call fcn.00775660
add esp, 4
mov edi, dword [esp]
mov eax, ebx
jmp 0x7998fe
mov ecx, esi
lea edx, [esp + 0x3c]
push ebx
push dword [esp + 0x30]
lea eax, [esp + 0x40]
push eax
call fcn.00799ac0
add esp, 0xc
test eax, eax
jne 0x799604
mov ebx, dword [esp + 0x20]
jmp 0x799671
mov edx, dword [esp + 0x18]
mov ecx, esi
inc edx
mov dword [esp + 0x18], edx
push dword [esp + 0x3c]
call fcn.00798870
add esp, 4
mov ebx, dword [esp + 0x20]
test eax, eax
jne 0x7995ca
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 8]
test eax, eax
je 0x799647
mov ebx, dword [esp + 0x18]
mov dword [esi + 0x44], ebx
mov dword [esi + 0x48], eax
mov word [esi + 0x42], cx
mov eax, dword [esi + 0x4c]
mov ebx, dword [esi + 0x50]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x44]
add eax, dword [esp + 0x14]
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x24]
adc ecx, dword [esp + 0x30]
cmp dword [esp + 0x40], eax
sbb dword [esp + 0x10], ecx
jge 0x799591
push dword [esp + 4]
call fcn.00775660
add esp, 4
mov eax, dword [esp + 0xc]
mov ecx, esi
mov dword [esi + 0x4c], eax
mov dword [esi + 0x50], ebx
call fcn.00798950
mov ecx, esi
call fcn.007989b0
mov dword [eax], 0
mov ecx, dword [esi + 0x44]
mov dword [eax + 0x20], ecx
mov dword [eax + 4], 0
mov dword [eax + 8], 0xffffffff
mov dword [eax + 0xc], 0xffffffff
mov dword [eax + 0x10], 0xffffffff
mov dword [eax + 0x14], 0xffffffff
mov ecx, dword [esi + 0x44]
test ecx, ecx
je 0x7996ce
mov dword [eax + 8], ecx
xor eax, eax
cmp dword [esi + 0x48], 0
je 0x7998fe
mov edx, fcn.007c44b0
movzx ecx, byte [0xbad38b]
imul edx, edx
and edx, 3
cmp edx, 2
sete al
xor al, 5
add al, 0x24
and al, 7
movzx eax, al
bt ecx, eax
jb 0x7998e4
mov al, byte [0xbad38b]
cmp edx, 2
mov ah, 1
sete cl
xor cl, 5
add cl, 0x24
and cl, 7
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbad38b], ah
jne 0x799709
mov ecx, fcn.007c44b0
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 2
sete dl
xor dl, 5
add dl, 0x24
and dl, 7
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x799773
cmp ecx, 2
movzx edx, byte [0xbad38b]
sete al
xor al, 5
add al, 0x24
and al, 7
movzx eax, al
bt edx, eax
jae 0x799753
jmp 0x7998e4
cmp ecx, 2
movzx ecx, byte [0xbad38b]
sete al
xor al, 5
add al, 0x24
and al, 7
movzx eax, al
bt ecx, eax
jb 0x7998bd
mov eax, fcn.007c44b0
xor ebx, ebx
imul eax, eax
and eax, 3
cmp eax, 2
mov eax, dword [0xbad360]
sete bl
xor ebx, 0xb773a7e5
add ebx, 0x24
mov edx, ebx
xor eax, ebx
shr edx, 0x1f
mov dword [0xbad360], eax
not eax
or edx, ebx
and bl, 7
imul edx, eax
mov eax, dword [0xbad364]
lea ecx, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbad364], eax
or ecx, edx
not eax
imul eax, ecx
mov ecx, dword [0xbad368]
lea edx, [eax*4]
xor ecx, eax
shr eax, 0x1d
mov dword [0xbad368], ecx
or edx, eax
not ecx
mov eax, dword [0xbad36c]
imul ecx, edx
lea edx, [ecx*8]
xor eax, ecx
shr ecx, 0x1c
mov dword [0xbad36c], eax
or edx, ecx
not eax
mov ecx, dword [0xbad370]
imul eax, edx
mov edx, eax
shl edx, 4
xor ecx, eax
shr eax, 0x1b
mov dword [0xbad370], ecx
or eax, edx
not ecx
imul ecx, eax
mov eax, dword [0xbad374]
mov edx, ecx
shl edx, 5
xor eax, ecx
shr ecx, 0x1a
mov dword [0xbad374], eax
or ecx, edx
not eax
imul eax, ecx
mov ecx, dword [0xbad378]
mov edx, eax
shl edx, 6
xor ecx, eax
shr eax, 0x19
mov dword [0xbad378], ecx
or eax, edx
not ecx
imul ecx, eax
mov eax, dword [0xbad37c]
mov edx, ecx
shl edx, 7
xor eax, ecx
shr ecx, 0x18
mov dword [0xbad37c], eax
or ecx, edx
not eax
imul eax, ecx
mov ecx, dword [0xbad380]
mov edx, eax
shl edx, 8
xor ecx, eax
shr eax, 0x17
mov dword [0xbad380], ecx
or eax, edx
not ecx
imul ecx, eax
mov al, 1
xor dword [0xbad384], ecx
mov ecx, ebx
shl al, cl
or byte [0xbad38b], al
mov eax, fcn.007c44b0
imul eax, eax
and eax, 3
cmp eax, 2
mov al, 0xfe
sete cl
xor cl, 5
add cl, 0x24
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbad38b], al
push dword [esi + 0x6c]
push dword [esi + 0x44]
push 0xbad360
push 0x11b
call fcn.00777b70
add esp, 0x10
xor eax, eax
mov ecx, esi
mov edx, edi
mov dword [esp], eax
push dword [esp + 0x28]
call fcn.00798a50
add esp, 4
mov ecx, esi
mov edx, 4
push 4
call fcn.00798a50
add esp, 4
mov ecx, dword [esp + 0x68]
xor ecx, ebp
call fcn.00980459
mov eax, dword [esp]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret