Function at 0x8130a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x30
mov eax, dword [0xbd33e0]
xor esi, esi
xor eax, esp
mov dword [esp + 0x2c], eax
cmp dword [edx + 0x44], 0
je 0x813557
cmp dword [edx + 0x34], 0
mov ebx, edx
jne 0x813557
test byte [ebx + 6], 0x10
jne 0x813557
mov ebp, ecx
call fcn.007f7590
mov dword [esp + 0x24], eax
mov eax, dword [ebx + 0x20]
mov ecx, dword [ebp]
mov edx, 0x50
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 0x24]
mov edi, ecx
mov dword [esp + 0x20], eax
mov eax, dword [ebx + 0x28]
mov dword [esp + 0x1c], eax
mov eax, dword [ebx + 0x2c]
mov dword [esp + 0x28], 0
mov esi, dword [ebx + 0x44]
mov dword [esp + 0x18], eax
push 0
call fcn.0078a8a0
add esp, 4
test eax, eax
je 0x8134ec
mov dword [esp + 4], eax
lea eax, [ebx + 0x20]
mov dword [esp + 8], edi
mov ecx, ebp
xor edx, edx
mov dword [eax + 0xc], 0
mov dword [eax + 8], 0
mov dword [eax + 4], 0
mov dword [esp + 0x14], eax
mov dword [eax], 0
mov eax, 0xffeffff7
and eax, dword [ebx + 4]
or eax, 0x100000
mov dword [ebx + 4], eax
push 1
push dword [esi + 8]
call fcn.008198a0
add esp, 8
mov ecx, ebp
mov edx, eax
push 1
mov edi, esi
push dword [esi + 0xc]
call fcn.008198a0
add esp, 8
test eax, eax
mov dword [esp], ebx
je 0x8131cf
mov ecx, dword [ebx + 0x30]
test ecx, ecx
je 0x8131cf
mov ecx, dword [ecx]
mov esi, dword [eax]
cmp ecx, esi
jg 0x8131cf
mov dword [eax], ecx
mov ecx, eax
mov edx, dword [ebx + 0x30]
mov ebx, eax
push 0xffffffffffffffff
call fcn.007fd8b0
add esp, 4
test eax, eax
jne 0x8131c6
mov eax, dword [esp]
mov ecx, dword [esp + 8]
mov edx, dword [eax + 0x30]
call fcn.007cb9f0
mov eax, dword [esp]
mov dword [eax + 0x30], 0
mov ecx, dword [esp]
mov dword [ebx], esi
mov eax, ebx
mov ebx, ecx
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x28]
mov edx, edi
mov esi, edi
lea ecx, [eax + 1]
mov dword [ebp + 0x28], ecx
mov dword [edi + 0x30], eax
add dword [ebp + 0x28], 3
lea eax, [esp + 0x28]
mov ecx, ebp
push eax
push dword [esp + 8]
push dword [ebx + 0x1c]
mov ebx, dword [esp + 0x18]
push ebx
call fcn.00819970
add esp, 0x10
mov edx, edi
lea eax, [esp + 0x28]
mov ecx, ebp
push eax
push dword [esp + 8]
mov eax, dword [esp + 8]
push dword [eax + 0x30]
push ebx
call fcn.00819970
add esp, 0x10
mov edx, dword [esp + 0x28]
mov eax, 0
test edx, edx
je 0x81322e
mov eax, dword [edx]
mov esi, edi
mov dword [edi + 0x4c], eax
mov ecx, ebp
push 0
push dword [edi + 8]
call fcn.008198a0
add esp, 8
mov edx, eax
mov ecx, ebp
push 0
push dword [edi + 0xc]
call fcn.008198a0
mov edx, edi
add esp, 8
mov ebx, eax
mov dword [esp + 0x28], eax
mov eax, dword [esi + 0x48]
mov ecx, dword [esi + 0x2c]
mov eax, dword [eax + 0x14]
test byte [ecx + 6], 0x10
je 0x813299
lea ebx, [esp + 0x28]
mov ecx, ebp
push ebx
push dword [esp + 8]
push eax
push dword [esp + 0x18]
call fcn.00819970
add esp, 0x10
mov ebx, dword [esp + 0x28]
test ebx, ebx
jne 0x81328e
xor eax, eax
jmp 0x813290
mov eax, dword [ebx]
mov dword [esi + 0x50], eax
mov byte [esi + 0x60], 1
jmp 0x8132bb
test ebx, ebx
jne 0x8132a1
xor ecx, ecx
jmp 0x8132a3
mov ecx, dword [ebx]
mov dword [esi + 0x50], ecx
mov ecx, ebp
mov edx, ebx
push 0
push eax
call fcn.008198a0
add esp, 8
mov ebx, eax
mov dword [esp + 0x28], eax
mov edx, dword [esi + 0x28]
test edx, edx
je 0x8132e3
mov ecx, dword [esp + 8]
push 0
call fcn.007fc000
add esp, 4
mov ecx, ebp
mov edx, ebx
push eax
call fcn.007e4370
add esp, 4
mov ebx, eax
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0x2c]
mov ecx, dword [esp + 0x24]
mov edx, 0x48
inc eax
mov dword [ebp + 0x2c], eax
mov dword [esi + 0x34], eax
mov eax, dword [ebp + 0x2c]
inc eax
mov dword [ebp + 0x2c], eax
mov dword [esi + 0x38], eax
push dword [esi + 0x34]
push 0
call fcn.007d10d0
add esp, 8
mov esi, dword [esi + 0x24]
mov edx, edi
test esi, esi
jne 0x81325b
mov esi, dword [esp + 0x20]
test ebx, ebx
jne 0x813461
mov edx, fcn.0082b260
xor eax, eax
movzx edi, byte [0xbb99fb]
imul edx, edx
and edx, 3
cmp edx, 1
seta al
mov ecx, eax
xor ecx, 3
lea eax, [ecx + eax*2]
bt edi, eax
jb 0x813438
mov al, byte [0xbb99fb]
xor ecx, ecx
cmp edx, 1
mov ah, 1
seta cl
mov ebx, ecx
xor ebx, 3
lea ecx, [ebx + ecx*2]
xor cl, 7
shl ah, cl
or ah, al
lock cmpxchg byte [0xbb99fb], ah
jne 0x813356
mov ecx, fcn.0082b260
xor edx, edx
movzx eax, al
imul ecx, ecx
and ecx, 3
cmp ecx, 1
seta dl
mov ebx, edx
xor ebx, 3
lea edx, [ebx + edx*2]
xor dl, 7
movzx edx, dl
bt eax, edx
jae 0x8133c0
xor eax, eax
cmp ecx, 1
movzx edi, byte [0xbb99fb]
seta al
mov edx, eax
xor edx, 3
lea eax, [edx + eax*2]
bt edi, eax
jae 0x8133a2
jmp 0x813438
xor eax, eax
cmp ecx, 1
movzx edx, byte [0xbb99fb]
seta al
mov ecx, eax
xor ecx, 3
lea eax, [ecx + eax*2]
bt edx, eax
jb 0x813410
mov eax, fcn.0082b260
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 1
seta cl
mov eax, ecx
xor eax, 0xdb8c24eb
lea ecx, [eax + ecx*2 + 0x220]
mov al, 1
xor dword [str._9], ecx
and cl, 7
shl al, cl
or byte [0xbb99fb], al
mov eax, fcn.0082b260
xor ecx, ecx
imul eax, eax
and eax, 3
cmp eax, 1
seta cl
mov eax, ecx
xor eax, 3
lea ecx, [eax + ecx*2]
mov al, 0xfe
xor cl, 7
rol al, cl
and byte [0xbb99fb], al
mov ecx, dword [esp + 8]
mov edx, 0x98
push str._9
call fcn.007e44c0
add esp, 4
mov ecx, ebp
xor edx, edx
push eax
call fcn.007e4370
add esp, 4
mov ebx, eax
mov dword [esp + 0x28], eax
mov ecx, ebp
mov edx, ebx
push 0
push 0
push dword [esp + 0x18]
push dword [esp + 0x24]
push dword [esp + 0x2c]
push esi
push dword [esp + 0x24]
call fcn.007e4230
add esp, 0x1c
mov esi, eax
xor edi, edi
mov ecx, ebp
xor edx, edx
push 0
push 0
call fcn.007e46f0
add esp, 8
mov ebx, dword [esp + 0x14]
test eax, eax
mov dword [ebx], eax
je 0x8134d4
mov dword [eax + 0x1c], esi
mov ecx, ebp
mov edx, dword [ebx]
call fcn.0080b130
or byte [esi + 4], 0x40
mov ecx, ebp
mov edx, esi
push 0x40
call fcn.008018d0
add esp, 4
test eax, eax
jne 0x8134ff
mov ebx, dword [esp]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
mov edi, 7
jmp 0x813522
mov ebx, dword [esp + 8]
mov edx, esi
mov ecx, ebx
call fcn.007cba90
mov ecx, ebx
mov ebx, dword [esp]
mov edx, dword [esp + 4]
jmp 0x813522
mov ecx, edi
mov edx, 7
mov esi, 7
call fcn.00799550
jmp 0x813557
mov edx, dword [esp + 4]
mov ecx, 0x14
mov esi, eax
mov edi, edx
rep movsd dword es:[edi], dword [esi]
or byte [edx + 0x24], 2
mov ecx, dword [ebx]
mov ebx, dword [esp]
xor edi, edi
mov dword [ecx + 0x18], edx
mov ecx, dword [esp + 8]
mov edx, eax
cmp byte [ecx + 0x51], 0
mov esi, 7
cmove esi, edi
call fcn.00780810
test esi, esi
jne 0x81353b
xor esi, esi
jmp 0x813557
cmp dword [ebp + 0x24], 0
jne 0x81354e
mov ecx, dword [ebp]
mov edx, 7
call fcn.00799550
mov ecx, ebp
mov edx, ebx
call fcn.00819a10
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.00989fe9
mov eax, esi
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret