Function at 0x807380
Capabilities:
Encode data using xor

Disassembly:
cmp byte [ecx + 0xc7], 0
jne 0x80783c
cmp byte [ecx + 0x10], 0
jne 0x80783c
push ebp
push ebx
push edi
push esi
sub esp, 0x1c
mov ebx, dword [ecx]
mov eax, dword [ecx + 8]
mov dword [esp], eax
mov eax, edx
mov edx, dword [edx + 0x34]
test edx, edx
jne 0x8073a6
mov edi, dword [eax + 0x1c]
mov eax, dword [eax + 0x20]
mov byte [ecx + 0x10], 1
mov dword [esp + 0x18], ecx
mov ecx, dword [ebx + 0x20]
mov edx, dword [edi]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
mov ecx, dword [esp]
call fcn.007c5ac0
cmp dword [edi], 0
jle 0x807827
mov eax, 0x796790
mov esi, 3
xor ebp, ebp
mov dword [esp + 8], ebx
sub esi, eax
lea edx, [ebp + ebp*4]
mov eax, dword [edi + edx*4 + 8]
mov ecx, dword [edi + edx*4 + 4]
test eax, eax
je 0x807410
test byte [edi + edx*4 + 0x10], 3
jne 0x807410
mov ecx, dword [esp]
mov edx, ebp
push 0xffffffffffffffff
jmp 0x807813
test byte [esp + 0x10], 0x44
je 0x8076c2
cmp byte [ecx], 0xa4
jne 0x8076c2
movzx eax, word [ecx + 0x20]
mov edx, dword [ecx + 0x2c]
test ax, ax
jns 0x807443
movzx eax, word [edx + 0x28]
test ax, ax
jns 0x807443
mov dword [esp + 0xc], 0xbb206c
jmp 0x807451
mov ecx, dword [edx + 4]
cwde
lea eax, [eax + eax*4]
mov eax, dword [ecx + eax*4]
mov dword [esp + 0xc], eax
mov ebx, 0x835860
mov eax, 0x835860
movzx ecx, byte [0xbb2077]
and ebx, 1
xor ebx, eax
cmp ebx, 0xffffffff
sete al
not al
and al, 5
movzx eax, al
bt ecx, eax
jb 0x80754e
mov al, byte [0xbb2077]
cmp ebx, 0xffffffff
mov ah, 1
sete cl
not cl
and cl, 5
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb2077], ah
jne 0x807482
cmp ebx, 0xffffffff
movzx eax, al
sete cl
not cl
and cl, 5
xor cl, 7
movzx ecx, cl
bt eax, ecx
jae 0x8074d4
cmp ebx, 0xffffffff
movzx ecx, byte [0xbb2077]
sete al
not al
and al, 5
movzx eax, al
bt ecx, eax
jae 0x8074b9
jmp 0x80754e
cmp ebx, 0xffffffff
movzx ecx, byte [0xbb2077]
sete al
not al
and al, 5
movzx eax, al
bt ecx, eax
jb 0x807536
mov dword [esp + 4], edx
xor edx, edx
cmp ebx, 0xffffffff
mov eax, dword [0xbb206c]
sete dl
xor edx, 0x93910615
add edx, 0x1380
mov ecx, edx
xor eax, edx
shr ecx, 0x1f
mov dword [0xbb206c], eax
not eax
or ecx, edx
and dl, 7
imul ecx, eax
mov al, 1
xor dword [0xbb2070], ecx
mov ecx, edx
mov edx, dword [esp + 4]
shl al, cl
or byte [0xbb2077], al
cmp ebx, 0xffffffff
mov al, 0xfe
sete cl
not cl
and cl, 5
xor cl, 7
rol al, cl
and byte [0xbb2077], al
test byte [esp + 0x10], 4
je 0x8076a4
mov ebx, fcn.007a3830
xor eax, eax
imul ebx, ebx
and ebx, 3
cmp ebx, 3
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 6]
movzx ecx, byte [0xbb2083]
and al, 7
movzx eax, al
bt ecx, eax
jb 0x807687
mov al, byte [0xbb2083]
mov dword [esp + 4], edx
xor ecx, ecx
cmp ebx, 3
sete cl
mov edx, ecx
xor edx, 1
lea ecx, [ecx + edx*2 + 6]
mov dl, 1
and cl, 7
xor cl, 7
shl dl, cl
or dl, al
lock cmpxchg byte [0xbb2083], dl
jne 0x807593
xor ecx, ecx
cmp ebx, 3
movzx eax, al
sete cl
mov edx, ecx
xor edx, 1
lea ecx, [ecx + edx*2 + 6]
mov edx, dword [esp + 4]
and cl, 7
xor cl, 7
movzx ecx, cl
bt eax, ecx
jae 0x807607
xor eax, eax
cmp ebx, 3
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 6]
movzx ecx, byte [0xbb2083]
and al, 7
movzx eax, al
bt ecx, eax
jae 0x8075e0
jmp 0x807687
xor eax, eax
cmp ebx, 3
sete al
mov ecx, eax
xor ecx, 1
lea eax, [eax + ecx*2 + 6]
movzx ecx, byte [0xbb2083]
and al, 7
movzx eax, al
bt ecx, eax
jb 0x807666
xor eax, eax
cmp ebx, 3
sete al
mov ecx, eax
not ecx
and ecx, 0x541
lea ecx, [eax + ecx*2 + 0x32ef2886]
mov eax, dword [0xbb2078]
xor eax, ecx
mov dword [0xbb2078], eax
not eax
imul eax, ecx
and cl, 7
xor dword [0xbb207c], eax
mov ah, 1
shl ah, cl
or byte [0xbb2083], ah
xor eax, eax
cmp ebx, 3
sete al
mov ecx, eax
xor ecx, 1
lea ecx, [eax + ecx*2 + 6]
mov al, 0xfe
and cl, 7
xor cl, 7
rol al, cl
and byte [0xbb2083], al
push dword [esp + 0xc]
push dword [edx]
push 0xbb2078
mov ebx, dword [esp + 0x14]
push ebx
call fcn.00782620
add esp, 0x10
jmp 0x807809
mov ecx, dword [esp]
mov edx, ebp
push 0xffffffffffffffff
push dword [esp + 0x10]
push 0
call fcn.007c5b20
add esp, 0xc
mov ebx, dword [esp + 8]
jmp 0x80781e
test eax, eax
jne 0x807800
mov eax, esi
movzx ecx, byte [0xbb2093]
xor eax, 0x796790
sete al
not al
and al, 3
movzx eax, al
bt ecx, eax
jb 0x8077ec
mov al, byte [0xbb2093]
mov ecx, esi
mov dl, 1
xor ecx, 0x796790
sete cl
not cl
and cl, 3
xor cl, 7
shl dl, cl
or dl, al
lock cmpxchg byte [0xbb2093], dl
jne 0x8076f0
mov ecx, esi
movzx eax, al
xor ecx, 0x796790
sete cl
not cl
and cl, 3
xor cl, 7
movzx ecx, cl
bt eax, ecx
jae 0x807753
mov eax, esi
movzx ecx, byte [0xbb2093]
xor eax, 0x796790
sete al
not al
and al, 3
movzx eax, al
bt ecx, eax
jae 0x807731
jmp 0x8077ec
mov eax, esi
movzx ecx, byte [0xbb2093]
xor eax, 0x796790
sete al
not al
and al, 3
movzx eax, al
bt ecx, eax
jb 0x8077d0
mov eax, esi
xor ecx, ecx
xor eax, 0x796790
mov eax, dword [0xbb2084]
sete cl
xor ecx, 0x5632133b
add ecx, 0x1088
mov edx, ecx
xor eax, ecx
shr edx, 0x1f
mov dword [0xbb2084], eax
not eax
or edx, ecx
and cl, 7
imul edx, eax
mov eax, dword [0xbb2088]
lea ebx, [edx + edx]
xor eax, edx
shr edx, 0x1e
mov dword [0xbb2088], eax
or ebx, edx
not eax
mov dl, 1
imul eax, ebx
mov ebx, dword [esp + 8]
shl dl, cl
xor dword [0xbb208c], eax
or byte [0xbb2093], dl
mov eax, esi
xor eax, 0x796790
mov al, 0xfe
sete cl
not cl
and cl, 3
xor cl, 7
rol al, cl
and byte [0xbb2093], al
lea eax, [ebp + 1]
push eax
push 0xbb2084
push ebx
call fcn.00782620
add esp, 0xc
jmp 0x807809
mov ecx, ebx
mov edx, eax
call fcn.0077edc0
mov ecx, dword [esp]
mov edx, ebp
push fcn.007756e0
push eax
push 0
call fcn.007c5b20
add esp, 0xc
inc ebp
cmp ebp, dword [edi]
jl 0x8073ed
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
push edi
call fcn.0080e000
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret