Function at 0x781d80
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
push eax
mov ebp, dword [ecx]
mov esi, ecx
mov dword [esp], edx
test byte [ebp + 0x18], 0x10
jne 0x781da5
mov ecx, esi
call fcn.007c5c50
mov ecx, eax
xor eax, eax
test ecx, ecx
jne 0x782568
mov ebx, dword [esp + 0x18]
mov ecx, ebp
mov edx, ebx
push dword [esp + 0x1c]
call fcn.0078bd40
add esp, 4
test eax, eax
jne 0x781f8d
cmp byte [esi + 0x19], 0
jne 0x781f7b
lea ecx, [ebp + 0x168]
mov edx, ebx
call fcn.007bf720
mov edi, eax
test eax, eax
jne 0x781f62
mov edx, fcn.00795680
xor eax, eax
movzx edi, byte [0xbaf1e3]
imul edx, edx
and edx, 3
cmp edx, 2
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2]
or al, 4
movzx eax, al
bt edi, eax
jb 0x781f43
mov al, byte [0xbaf1e3]
mov edi, ebx
xor ebx, ebx
cmp edx, 2
mov ah, 1
sete bl
mov ecx, ebx
xor ecx, 1
lea ebx, [ebx + ecx*2]
mov cl, 7
or bl, 4
sub cl, bl
shl ah, cl
or ah, al
lock cmpxchg byte [0xbaf1e3], ah
jne 0x781e19
mov ecx, fcn.00795680
xor edx, edx
mov ah, 7
imul ecx, ecx
and ecx, 3
cmp ecx, 2
sete dl
mov ebx, edx
xor ebx, 1
lea edx, [edx + ebx*2]
or dl, 4
sub ah, dl
movzx edx, ah
movzx eax, al
bt eax, edx
jae 0x781e95
mov ebx, edi
xor eax, eax
cmp ecx, 2
movzx edi, byte [0xbaf1e3]
sete al
mov edx, eax
xor edx, 1
lea eax, [eax + edx*2]
or al, 4
movzx eax, al
bt edi, eax
jae 0x781e6f
jmp 0x781f43
xor eax, eax
cmp ecx, 2
movzx edx, byte [0xbaf1e3]
mov ebx, edi
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2]
or al, 4
movzx eax, al
bt edx, eax
jb 0x781f18
mov ecx, fcn.00795680
xor eax, eax
imul ecx, ecx
and ecx, 3
cmp ecx, 2
sete al
mov ecx, eax
not ecx
and ecx, 0x41
lea ecx, [eax + ecx*2 + 0x1eec3bb4]
mov eax, dword [0xbaf1d4]
xor eax, ecx
mov dword [0xbaf1d4], eax
not eax
mov edx, dword [0xbaf1d8]
imul eax, ecx
and cl, 7
lea edi, [eax + eax]
xor edx, eax
shr eax, 0x1e
mov dword [0xbaf1d8], edx
or eax, edi
not edx
imul edx, eax
xor dword [0xbaf1dc], edx
mov dl, 1
shl dl, cl
or byte [0xbaf1e3], dl
mov eax, fcn.00795680
xor ecx, ecx
mov dl, 0xfe
imul eax, eax
and eax, 3
cmp eax, 2
sete cl
mov eax, ecx
xor eax, 1
lea eax, [ecx + eax*2]
mov cl, 7
or al, 4
sub cl, al
rol dl, cl
and byte [0xbaf1e3], dl
push 7
push 0xbaf1d4
push ebx
call fcn.00777e50
add esp, 0xc
test eax, eax
jne 0x781f7b
mov ecx, ebp
mov edx, ebx
call fcn.007c5c90
mov edi, eax
test edi, edi
je 0x781f7b
mov ecx, esi
mov edx, edi
call fcn.007c5cd0
test eax, eax
je 0x781f7b
mov eax, dword [edi + 0x14]
jmp 0x782568
xor eax, eax
test byte [esp], 2
jne 0x782568
mov byte [esi + 0x11], 1
jmp 0x781fa1
cmp dword [eax + 0x38], 0
je 0x782568
cmp byte [esi + 0x19], 0
je 0x782568
mov eax, fcn.007a06d0
mov edx, 3
movzx edi, byte [0xbaf203]
sub edx, eax
xor eax, eax
mov ecx, edx
xor ecx, fcn.007a06d0
sete al
mov ecx, eax
xor ecx, 5
lea eax, [ecx + eax*2]
bt edi, eax
jb 0x782132
mov al, byte [0xbaf203]
mov ebp, ebx
mov edi, edx
xor ecx, ecx
mov ah, 1
xor edi, fcn.007a06d0
sete cl
mov ebx, ecx
xor ebx, 5
lea ecx, [ebx + ecx*2]
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbaf203], ah
jne 0x781fd9
mov edx, fcn.007a06d0
mov ecx, 3
movzx eax, al
sub ecx, edx
xor edx, edx
mov edi, ecx
xor edi, fcn.007a06d0
sete dl
mov ebx, edx
xor ebx, 5
lea edx, [ebx + edx*2]
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x782058
mov ebx, ebp
mov edx, ecx
xor eax, eax
movzx edi, byte [0xbaf203]
xor edx, fcn.007a06d0
sete al
mov edx, eax
xor edx, 5
lea eax, [edx + eax*2]
bt edi, eax
jae 0x782032
jmp 0x782132
xor eax, eax
xor ecx, fcn.007a06d0
movzx edx, byte [0xbaf203]
mov ebx, ebp
sete al
mov ecx, eax
xor ecx, 5
lea eax, [ecx + eax*2]
bt edx, eax
jb 0x782106
mov eax, fcn.007a06d0
mov ecx, 3
sub ecx, eax
xor eax, eax
xor ecx, fcn.007a06d0
sete al
mov ecx, eax
xor ecx, 0xfc701c35
lea ecx, [ecx + eax*2 + 0x590]
mov eax, dword [0xbaf1f0]
mov edx, ecx
shr edx, 0x1f
or edx, ecx
xor eax, ecx
and cl, 7
mov dword [0xbaf1f0], eax
not eax
imul edx, eax
mov eax, dword [0xbaf1f4]
lea edi, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbaf1f4], eax
or edi, edx
not eax
mov edx, dword [0xbaf1f8]
imul eax, edi
lea edi, [eax*4]
xor edx, eax
shr eax, 0x1d
mov dword [0xbaf1f8], edx
or edi, eax
not edx
mov al, 1
imul edx, edi
shl al, cl
xor dword [0xbaf1fc], edx
or byte [0xbaf203], al
mov eax, fcn.007a06d0
mov ecx, 3
sub ecx, eax
xor eax, eax
xor ecx, fcn.007a06d0
sete al
mov ecx, eax
xor ecx, 5
lea ecx, [ecx + eax*2]
mov al, 0xfe
xor cl, 7
rol al, cl
and byte [0xbaf203], al
mov edx, 0x835080
xor eax, eax
movzx edi, byte [0xbaf223]
imul edx, edx
and edx, 3
cmp edx, 3
sete al
mov ecx, eax
xor ecx, 5
lea eax, [ecx + eax*2]
bt edi, eax
jb 0x782296
mov al, byte [0xbaf223]
mov edi, ebx
xor ecx, ecx
cmp edx, 3
mov ah, 1
sete cl
mov ebx, ecx
xor ebx, 5
lea ecx, [ebx + ecx*2]
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbaf223], ah
jne 0x782164
mov ecx, 0x835080
xor edx, edx
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 3
sete dl
mov ebx, edx
xor ebx, 5
lea edx, [ebx + edx*2]
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x7821d3
mov ebx, edi
xor eax, eax
cmp ecx, 3
movzx edi, byte [0xbaf223]
sete al
mov edx, eax
xor edx, 5
lea eax, [edx + eax*2]
bt edi, eax
jae 0x7821b2
jmp 0x782296
xor eax, eax
cmp ecx, 3
movzx edx, byte [0xbaf223]
mov ebx, edi
sete al
mov ecx, eax
xor ecx, 5
lea eax, [ecx + eax*2]
bt edx, eax
jb 0x78226e
mov eax, 0x835080
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 3
sete cl
mov eax, ecx
xor eax, 0x23ded8e5
lea ecx, [eax + ecx*2 + 0xe30]
mov eax, dword [0xbaf210]
xor eax, ecx
mov dword [0xbaf210], eax
not eax
mov edx, dword [0xbaf214]
imul eax, ecx
and cl, 7
lea edi, [eax + eax]
xor edx, eax
shr eax, 0x1e
mov dword [0xbaf214], edx
or edi, eax
not edx
mov eax, dword [0xbaf218]
imul edx, edi
lea edi, [edx*4]
xor eax, edx
shr edx, 0x1d
mov dword [0xbaf218], eax
or edi, edx
not eax
mov dl, 1
imul eax, edi
shl dl, cl
xor dword [0xbaf21c], eax
or byte [0xbaf223], dl
mov eax, 0x835080
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 3
sete cl
mov eax, ecx
xor eax, 5
lea ecx, [eax + ecx*2]
mov al, 0xfe
xor cl, 7
rol al, cl
and byte [0xbaf223], al
test byte [esp], 1
mov eax, 0xbaf210
mov ebp, 0xbaf1f0
cmove ebp, eax
cmp dword [esp + 0x1c], 0
je 0x782431
mov edi, fcn.007a1c30
xor eax, eax
movzx edx, byte [0xbaf233]
imul edi, edi
and edi, 3
cmp edi, 3
sete al
mov ecx, eax
not ecx
lea eax, [eax + ecx*2 + 4]
and al, 7
movzx eax, al
bt edx, eax
jb 0x782418
mov al, byte [0xbaf233]
xor ecx, ecx
cmp edi, 3
mov ah, 1
sete cl
mov ebx, ecx
not ebx
lea ecx, [ecx + ebx*2 + 4]
and cl, 7
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbaf233], ah
jne 0x7822e7
mov ecx, fcn.007a1c30
xor edx, edx
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 3
sete dl
mov ebx, edx
not ebx
lea edx, [edx + ebx*2 + 4]
and dl, 7
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x782363
mov ebx, dword [esp + 0x18]
xor eax, eax
cmp ecx, 3
movzx edi, byte [0xbaf233]
sete al
mov edx, eax
not edx
lea eax, [eax + edx*2 + 4]
and al, 7
movzx eax, al
bt edi, eax
jae 0x78233d
jmp 0x782418
xor eax, eax
cmp ecx, 3
movzx edx, byte [0xbaf233]
mov ebx, dword [esp + 0x18]
sete al
mov ecx, eax
not ecx
lea eax, [eax + ecx*2 + 4]
and al, 7
movzx eax, al
bt edx, eax
jb 0x7823ed
mov ecx, fcn.007a1c30
xor eax, eax
imul ecx, ecx
and ecx, 3
cmp ecx, 3
sete al
mov ecx, eax
not ecx
and ecx, 0x13
lea ecx, [eax + ecx*2 + 0x681f1fcc]
mov eax, dword [0xbaf224]
mov edx, ecx
shr edx, 0x1f
or edx, ecx
xor eax, ecx
and cl, 7
mov dword [0xbaf224], eax
not eax
imul edx, eax
mov eax, dword [0xbaf228]
lea edi, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbaf228], eax
or edi, edx
not eax
mov dl, 1
imul eax, edi
shl dl, cl
xor dword [0xbaf22c], eax
or byte [0xbaf233], dl
mov eax, fcn.007a1c30
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 3
sete cl
mov eax, ecx
not eax
lea ecx, [ecx + eax*2 + 4]
mov al, 0xfe
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbaf233], al
push ebx
push dword [esp + 0x20]
push ebp
push 0xbaf224
push esi
call fcn.00782570
add esp, 0x14
jmp 0x782566
mov edi, 0x98b254
movzx ecx, byte [0xbaf23f]
imul edi, edi
and edi, 3
cmp edi, 1
seta al
or al, 4
add al, 0xf4
and al, 7
movzx eax, al
bt ecx, eax
jb 0x782556
mov al, byte [0xbaf23f]
cmp edi, 1
mov dl, 1
seta cl
or cl, 4
add cl, 0xf4
and cl, 7
xor cl, 7
shl dl, cl
or dl, al
lock cmpxchg byte [0xbaf23f], dl
jne 0x782460
mov ecx, 0x98b254
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 1
seta dl
or dl, 4
add dl, 0xf4
and dl, 7
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x7824ca
cmp ecx, 1
movzx edx, byte [0xbaf23f]
seta al
or al, 4
add al, 0xf4
and al, 7
movzx eax, al
bt edx, eax
jae 0x7824aa
jmp 0x782556
cmp ecx, 1
movzx ecx, byte [0xbaf23f]
seta al
or al, 4
add al, 0xf4
and al, 7
movzx eax, al
bt ecx, eax
jb 0x78252f
mov eax, 0x98b254
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 1
mov eax, dword [0xbaf234]
seta cl
or ecx, 0xa9d73d84
add ecx, 0x4f4
mov edx, ecx
xor eax, ecx
shr edx, 0x1f
mov dword [0xbaf234], eax
not eax
or edx, ecx
and cl, 7
imul edx, eax
xor dword [0xbaf238], edx
mov dl, 1
shl dl, cl
or byte [0xbaf23f], dl
mov eax, 0x98b254
imul eax, eax
and eax, 3
cmp eax, 1
mov al, 0xfe
seta cl
or cl, 4
add cl, 0xf4
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbaf23f], al
push ebx
push ebp
push 0xbaf234
push esi
call fcn.00782570
add esp, 0x10
xor eax, eax
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret