Function at 0x795900
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x8c
mov eax, dword [esp + 0xa8]
mov dword [esp + 0x14], ecx
mov ebp, edx
mov edx, dword [esp + 0xac]
mov edi, dword [esp + 0xa0]
mov dword [esp + 0xc], eax
mov eax, dword [0xbcbae0]
xor eax, esp
test ebp, ebp
mov dword [esp + 0x88], eax
je 0x795a8a
mov edx, fcn.00828280
movzx ecx, byte [0xbad33b]
imul edx, edx
and edx, 3
cmp edx, 3
setne al
or al, 4
movzx eax, al
bt ecx, eax
jb 0x795a5a
mov al, byte [0xbad33b]
cmp edx, 3
mov ah, 1
setne cl
or cl, 4
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbad33b], ah
jne 0x79596a
mov ecx, fcn.00828280
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 3
setne dl
or dl, 4
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x7959c4
cmp ecx, 3
movzx edx, byte [0xbad33b]
setne al
or al, 4
movzx eax, al
bt edx, eax
jae 0x7959a8
jmp 0x795a5a
cmp ecx, 3
movzx edx, byte [0xbad33b]
setne al
or al, 4
movzx eax, al
bt edx, eax
jb 0x795a39
mov eax, fcn.00828280
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 3
mov eax, dword [0xbad32c]
sete cl
xor ecx, 0x7124109
add ecx, 0xdec
xor eax, ecx
mov dword [0xbad32c], eax
not eax
mov edx, dword [0xbad330]
imul eax, ecx
and cl, 7
lea esi, [eax + eax]
xor edx, eax
shr eax, 0x1e
mov dword [0xbad330], edx
or esi, eax
not edx
mov al, 1
imul edx, esi
shl al, cl
xor dword [0xbad334], edx
or byte [0xbad33b], al
mov eax, fcn.00828280
imul eax, eax
and eax, 3
cmp eax, 3
mov al, 0xfe
setne cl
or cl, 4
xor cl, 7
rol al, cl
and byte [0xbad33b], al
mov al, byte [ebp]
test al, al
mov byte [esp + 4], al
sete bl
push 0xbad32c
push ebp
call fcn.009803a0
add esp, 8
mov edx, dword [esp + 0xac]
test eax, eax
je 0x795aa3
cmp byte [esp + 4], 0
je 0x795a8a
xor ebx, ebx
jmp 0x795a9b
mov ecx, edi
mov esi, edx
call fcn.00795fa0
mov edx, esi
mov bl, 1
test eax, eax
jne 0x795aa3
test dl, dl
js 0x795aa3
xor ecx, ecx
jmp 0x795aaa
or dword [esp + 0xc], 2
mov cl, 1
mov eax, edx
mov esi, edx
mov dword [esp + 0x18], ecx
mov dword [esp + 4], 0
and eax, 0xfffffcff
or eax, 0x200
test bl, bl
cmovne esi, eax
test cl, cl
mov ecx, 0x30
cmovne esi, eax
test edx, 0x100
cmove esi, edx
xor edx, edx
mov dword [esp + 0x20], esi
call fcn.0077b7b0
mov esi, 7
test eax, eax
je 0x795f84
test bl, bl
mov byte [eax + 8], 0
mov dword [eax], edi
mov dword [eax + 0x20], eax
mov dword [eax + 0x24], 1
mov dword [esp], eax
mov dword [esp + 0x10], ebp
jne 0x795cd5
mov ecx, dword [esp + 0x20]
test cl, 0x40
sete al
test ecx, 0x20000
mov ecx, dword [esp + 0x18]
je 0x795cd5
and al, cl
jne 0x795cd5
mov ecx, dword [esp + 0x10]
call fcn.00777870
mov ebp, eax
mov eax, dword [esp + 0x14]
inc ebp
mov ecx, ebp
mov edi, dword [eax + 8]
inc edi
cmp edi, ebp
cmovge ecx, edi
mov edx, ecx
sar edx, 0x1f
call fcn.007755a0
mov ecx, dword [esp]
test eax, eax
mov dword [esp + 8], eax
mov byte [ecx + 9], 1
jne 0x795b74
push ecx
call fcn.00775660
jmp 0x795f81
cmp byte [esp + 0x18], 0
je 0x795bd0
push ebp
push dword [esp + 0x14]
push dword [esp + 0x10]
call fcn.009806e0
add esp, 0xc
mov edi, dword [esp + 0xa0]
mov ecx, 4
call fcn.00775140
mov dword [esp + 4], eax
push eax
call fcn.007748d0
add esp, 4
mov ecx, 2
call fcn.00775140
mov esi, eax
push eax
call fcn.007748d0
add esp, 4
mov ebp, dword [0xc1f28c]
test ebp, ebp
jne 0x795c13
xor ebp, ebp
jmp 0x795cb8
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
push dword [esp + 8]
push edi
call fcn.00795fb0
add esp, 8
mov edi, dword [esp + 0xa0]
mov esi, eax
or eax, 0x200
cmp eax, 0x200
je 0x795b93
push dword [esp + 8]
call fcn.00775660
add esp, 4
push dword [esp]
call fcn.00775660
jmp 0x795f81
mov dword [esp + 0x1c], esi
mov esi, dword [ebp]
xor edx, edx
mov ecx, esi
call fcn.00795fd0
push eax
push dword [esp + 0xc]
call fcn.009803a0
add esp, 8
test eax, eax
jne 0x795ca7
mov ecx, esi
call fcn.006cb3a0
cmp eax, dword [esp + 0x14]
jne 0x795ca7
mov eax, dword [edi + 0x14]
mov esi, dword [esp + 0x1c]
test eax, eax
jle 0x795c66
mov ecx, dword [edi + 0x10]
dec eax
mov edx, eax
shl edx, 4
mov edx, dword [ecx + edx + 4]
test edx, edx
je 0x795c62
cmp dword [edx + 4], ebp
je 0x795c71
test eax, eax
jg 0x795c4f
mov eax, dword [esp]
mov dword [eax + 4], ebp
inc dword [ebp + 0x44]
jmp 0x795cb8
push esi
call fcn.007748e0
add esp, 4
push dword [esp + 4]
call fcn.007748e0
add esp, 4
push dword [esp + 8]
call fcn.00775660
add esp, 4
push dword [esp]
call fcn.00775660
add esp, 4
mov esi, 0x13
jmp 0x795f84
mov ebp, dword [ebp + 0x48]
test ebp, ebp
jne 0x795c17
mov esi, dword [esp + 0x1c]
xor ebp, ebp
push esi
call fcn.007748e0
add esp, 4
push dword [esp + 8]
call fcn.00775660
add esp, 4
test ebp, ebp
jne 0x795ea3
mov ecx, 0x58
xor edx, edx
call fcn.0077b7b0
mov ebp, eax
test eax, eax
jne 0x795cf5
mov edi, dword [esp + 4]
mov esi, 7
jmp 0x795e5d
mov ecx, dword [esp + 0x14]
mov edx, ebp
push dword [esp + 0x20]
mov ebx, dword [esp + 0x10]
push ebx
push dword [esp + 0x18]
call fcn.00795ff0
add esp, 0xc
mov esi, eax
test eax, eax
jne 0x795e4b
mov edx, dword [edi + 0x30]
mov ecx, dword [ebp]
push dword [edi + 0x34]
call fcn.007967c0
add esp, 4
mov ecx, dword [ebp]
lea edx, [esp + 0x24]
call fcn.007967e0
mov esi, eax
test eax, eax
jne 0x795e4b
mov byte [ebp + 0x10], bl
mov dword [ebp + 4], edi
mov edx, ebp
mov ecx, dword [ebp]
call fcn.00796820
mov eax, dword [esp]
mov dword [eax + 4], ebp
mov dword [ebp + 8], 0
mov dword [ebp + 0xc], 0
mov ecx, dword [ebp]
mov dword [esp + 0xc], ecx
call fcn.00796870
test al, al
je 0x795d79
or byte [ebp + 0x18], 1
movzx ecx, byte [esp + 0x34]
movzx edx, byte [esp + 0x35]
mov ebx, ebp
add ebx, 0x24
shl ecx, 8
shl edx, 0x10
lea eax, [edx + ecx]
lea ecx, [edx + ecx - 0x200]
cmp ecx, 0xfe00
mov dword [ebp + 0x24], eax
ja 0x795daa
lea ecx, [eax - 1]
test ecx, eax
je 0x795dc8
cmp dword [esp + 0x10], 0
mov dword [ebx], 0
sete al
xor esi, esi
or al, byte [esp + 0x18]
jne 0x795df0
mov word [ebp + 0x11], 0
jmp 0x795df0
movzx esi, byte [esp + 0x38]
or word [ebp + 0x18], 2
lea ecx, [esp + 0x58]
call fcn.0055d990
test eax, eax
lea ecx, [esp + 0x64]
setne byte [ebp + 0x11]
call fcn.0055d990
test eax, eax
setne byte [ebp + 0x12]
mov ecx, dword [esp + 0xc]
mov edx, ebx
mov ebx, esi
push esi
call fcn.00796880
add esp, 4
mov esi, eax
test eax, eax
jne 0x795e4b
mov eax, dword [ebp + 0x24]
mov ecx, dword [esp]
sub eax, ebx
mov dword [ebp + 0x28], eax
mov dword [ebp + 0x44], 1
cmp byte [ecx + 9], 0
je 0x795ea3
mov ecx, 2
call fcn.00775140
cmp byte [0xbab994], 0
mov esi, eax
je 0x795e83
xor ecx, ecx
call fcn.00775140
test eax, eax
mov dword [ebp + 0x3c], eax
jne 0x795e83
mov esi, 7
mov ecx, dword [ebp]
mov edi, dword [esp + 4]
test ecx, ecx
je 0x795e5d
xor edx, edx
call fcn.007969e0
push ebp
call fcn.00775660
add esp, 4
push dword [esp]
call fcn.00775660
add esp, 4
mov eax, dword [esp + 0xa4]
mov dword [eax], 0
jmp 0x795f77
push esi
call fcn.007748d0
add esp, 4
mov eax, dword [0xc1f28c]
mov dword [ebp + 0x48], eax
mov dword [0xc1f28c], ebp
push esi
call fcn.007748e0
add esp, 4
mov eax, dword [esp]
cmp byte [eax + 9], 0
je 0x795f24
mov eax, dword [edi + 0x14]
test eax, eax
jle 0x795f24
mov ecx, dword [edi + 0x10]
xor edx, edx
mov esi, edx
shl esi, 4
mov esi, dword [ecx + esi + 4]
test esi, esi
je 0x795f1f
cmp byte [esi + 9], 0
je 0x795f1f
mov eax, esi
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x795ecb
mov ecx, dword [esp]
mov edx, dword [ecx + 4]
cmp edx, dword [eax + 4]
jae 0x795eee
mov dword [ecx + 0x18], eax
mov dword [ecx + 0x1c], 0
mov dword [eax + 0x1c], ecx
jmp 0x795f24
mov ecx, eax
mov eax, dword [eax + 0x18]
test eax, eax
jne 0x795f09
mov eax, dword [esp]
mov dword [eax + 0x18], 0
mov dword [eax + 0x1c], ecx
mov dword [ecx + 0x18], eax
jmp 0x795f24
cmp dword [eax + 4], edx
jb 0x795eee
mov edx, dword [esp]
mov dword [edx + 0x18], eax
mov dword [edx + 0x1c], ecx
mov dword [eax + 0x1c], edx
mov dword [ecx + 0x18], edx
jmp 0x795f24
inc edx
cmp edx, eax
jl 0x795eb8
mov edi, dword [esp]
mov eax, dword [esp + 0xa4]
xor esi, esi
xor edx, edx
mov dword [eax], edi
mov ecx, edi
push 0
call fcn.00796ac0
add esp, 4
test eax, eax
jne 0x795f53
mov eax, dword [edi + 4]
mov edx, 0xfffff830
mov ecx, dword [eax]
call fcn.00796b10
mov ecx, dword [ebp]
call fcn.0077ca70
cmp dword [eax], 0
je 0x795f73
add ebp, 4
mov ecx, eax
mov edx, 0x1e
push ebp
call fcn.00796b20
add esp, 4
mov edi, dword [esp + 4]
test edi, edi
je 0x795f84
push edi
call fcn.007748e0
add esp, 4
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.00980459
mov eax, esi
add esp, 0x8c
pop esi
pop edi
pop ebx
pop ebp
ret