Function at 0x8003b32d
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov al, byte [0x80060ba0]
push ebx
push esi
xor esi, esi
xor ebx, ebx
inc esi
cmp al, 1
push edi
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x14], ebx
mov byte [0x80060ba2], al
jne 0x8003b358
lea eax, [ebp + 0x10]
push eax
call fcn.8003a72a
cmp dword [ebp + 0x10], ebx
jne 0x8003b364
mov dword [ebp + 0x10], 0xf010101
push dword [sym.xboxkrnl.exe_Ordinal_356]
call fcn.8003a13c
mov edx, dword [ebp + 0x10]
mov ecx, edx
shr ecx, 0x18
and cl, 0xf
mov byte [ebp - 3], cl
movzx ecx, byte [ebp + 0x12]
mov dword [ebp - 0x20], ecx
movzx ecx, dh
mov dword [ebp - 0x28], ecx
mov ecx, edx
and ecx, 0x7f
mov edi, edx
mov dword [ebp - 8], ecx
mov cl, byte [0x80060ba2]
and edi, 0xc0000000
test cl, cl
jne 0x8003b3c7
cmp byte [0x80044a18], cl
jne 0x8003b3b6
cmp eax, 5
je 0x8003b3b6
mov dword [ebp - 0x14], ebx
jmp 0x8003b3c4
cmp edi, 0x80000000
mov dword [ebp - 0x14], esi
mov dword [ebp - 0xc], esi
je 0x8003b3c7
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp + 0x14]
sub eax, 0x10
je 0x8003b3f1
dec eax
je 0x8003b3e4
dec eax
je 0x8003b3de
sub eax, 0xa
je 0x8003b3f1
dec eax
dec eax
jne 0x8003b3fc
mov byte [ebp + 0x17], 3
jmp 0x8003b3f5
mov dword [ebp - 0x10], 0x101030
mov byte [ebp + 0x17], 2
jmp 0x8003b3fc
mov byte [ebp + 0x17], 2
mov dword [ebp - 0x10], 0x100030
mov eax, dword [ebp + 0x18]
shr eax, 3
cmp dword [0x80060b90], edx
mov dword [ebp + 0x18], eax
jne 0x8003b4b1
cmp dword [0x80060b9c], 2
je 0x8003b4b1
mov esi, dword [ebp + 8]
mov ecx, dword [ebp - 0x10]
mov dword [esi + 0x680600], ecx
mov byte [esi + 0x6013d4], 0x1f
mov byte [esi + 0x6013d5], 0x57
mov byte [esi + 0x6013d4], 0x13
mov byte [esi + 0x6013d5], al
shr eax, 3
and ax, 0xe0
mov byte [esi + 0x6013d4], 0x19
mov byte [esi + 0x6013d5], al
mov al, byte [ebp + 0x17]
push ebx
or al, 0x80
push 5
mov byte [esi + 0x6013d4], 0x28
mov byte [esi + 0x6013d5], al
mov eax, dword [ebp + 0x1c]
push 0xb
push esi
mov dword [esi + 0x600800], eax
call sym.xboxkrnl.exe_Ordinal_2
push ebx
push ebx
push 0xe
push esi
call sym.xboxkrnl.exe_Ordinal_2
cmp dword [ebp - 0x14], ebx
mov eax, dword [ebp + 0x10]
mov dword [0x80060b90], eax
je 0x8003b90a
mov dword [esi + 0x680630], ebx
mov dword [esi + 0x6808c4], ebx
mov dword [esi + 0x68084c], ebx
jmp 0x8003b90a
cmp cl, 1
jne 0x8003b4bf
push 1
push 0x60
call fcn.8003a394
mov esi, dword [ebp + 8]
mov dx, 0x80d3
mov al, 5
out dx, al
mov eax, dword [esi + 0x6806a0]
mov ecx, eax
shr ecx, 4
mov dword [ebp - 0x2c], eax
not ecx
not eax
xor ecx, eax
test cl, 1
jne 0x8003b4c9
mov byte [esi + 0x6013d4], 0x1f
mov byte [esi + 0x6013d5], 0x57
mov byte [esi + 0x6013d4], 0x21
mov byte [esi + 0x6013d5], 0xff
mov byte [esi + 0x6013d4], 0x28
mov byte [esi + 0x6013d5], 0
push 1
mov dword [esi + 0x680880], 0x21121111
call sym.xboxkrnl.exe_Ordinal_151
push 0xc
push 0
push 0xc
mov ebx, 0xd4
push ebx
call sym.xboxkrnl.exe_Ordinal_50
cmp dword [ebp - 0xc], 0
je 0x8003b577
mov edi, dword [ebp - 8]
shl edi, 6
lea edi, [edi - 0x7ffe96e8]
lea eax, [edi + 0x40]
cmp edi, eax
mov dword [ebp - 0xc], eax
jae 0x8003b646
mov dword [ebp + 8], 0x80016918
sub dword [ebp + 8], edi
movzx eax, byte [edi]
push eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax + edi]
push 0
push eax
push ebx
call sym.xboxkrnl.exe_Ordinal_50
inc edi
cmp edi, dword [ebp - 0xc]
jb 0x8003b558
jmp 0x8003b646
cmp edi, 0x80000000
jne 0x8003b5c2
mov edi, dword [ebp - 8]
shl edi, 6
lea edi, [edi - 0x7ffe97e8]
lea eax, [edi + 0x40]
cmp edi, eax
mov dword [ebp - 0xc], eax
jae 0x8003b646
mov dword [ebp + 8], 0x80016818
sub dword [ebp + 8], edi
movzx eax, byte [edi]
push eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax + edi]
push 0
push eax
push ebx
call sym.xboxkrnl.exe_Ordinal_50
inc edi
cmp edi, dword [ebp - 0xc]
jb 0x8003b5a3
jmp 0x8003b646
mov edi, 0x80016061
movzx eax, byte [edi]
push eax
xor eax, eax
mov al, byte [edi - 0x31]
push 0
push eax
push ebx
call sym.xboxkrnl.exe_Ordinal_50
inc edi
cmp edi, 0x80016092
jb 0x8003b5c7
mov edi, dword [ebp - 8]
shl edi, 6
lea edi, [edi - 0x7ffe9f68]
lea eax, [edi + 0x40]
cmp edi, eax
mov dword [ebp - 0xc], eax
jae 0x8003b61c
mov dword [ebp + 8], 0x80016098
sub dword [ebp + 8], edi
movzx eax, byte [edi]
push eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax + edi]
push 0
push eax
push ebx
call sym.xboxkrnl.exe_Ordinal_50
inc edi
cmp edi, dword [ebp - 0xc]
jb 0x8003b602
cmp dword [0x80056d08], 2
jne 0x8003b646
cmp dword [ebp - 8], 0xd
je 0x8003b637
cmp dword [ebp - 8], 0xe
je 0x8003b637
cmp dword [ebp - 8], 0x12
jne 0x8003b646
push 0x13c
push 1
push 0x4e
push ebx
call sym.xboxkrnl.exe_Ordinal_50
test byte [ebp + 0x13], 0x20
je 0x8003b655
push dword [ebp - 8]
push esi
call fcn.8003b2d9
mov eax, dword [ebp + 0x10]
mov edi, dword [ebp - 0x20]
and dword [ebp + 8], 0
imul edi, edi, 0x68
shr eax, 0x1c
and al, 1
or al, 4
mov dx, 0x80d6
out dx, al
add dx, 2
mov al, 4
out dx, al
lea ecx, [esi + 0x68050c]
mov eax, dword [ecx]
or eax, 0x10020000
mov dword [ecx], eax
mov eax, dword [ebp - 0x10]
mov byte [esi + 0xc03c3], 1
add edi, 0x80016a48
mov byte [esi + 0xc03c2], 0xe3
mov dword [esi + 0x680600], eax
lea eax, [edi + 0x68]
cmp edi, eax
mov dword [ebp - 0x10], eax
jae 0x8003b704
cmp byte [0x80060ba2], 1
mov eax, dword [edi]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax*4 - 0x7ffe95b8]
mov dword [ebp - 0x1c], eax
jne 0x8003b6f0
lea eax, [ebp - 0x18]
push eax
xor eax, eax
mov al, byte [ebp + 8]
add al, 0x1a
shl al, 2
push eax
push 1
call fcn.8003a4ca
lea eax, [ebp - 0x1c]
push eax
xor eax, eax
mov al, byte [ebp + 8]
shl al, 2
push eax
push 1
call fcn.8003a4ca
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
add edi, 4
inc dword [ebp + 8]
cmp edi, dword [ebp - 0x10]
mov dword [ecx + esi], eax
jb 0x8003b6ab
test byte [ebp + 0x13], 0x20
jne 0x8003b711
xor edx, edx
cmp dword [ebp - 0x14], edx
je 0x8003b725
xor edx, edx
mov dword [esi + 0x680630], edx
mov dword [esi + 0x6808c4], edx
mov dword [esi + 0x68084c], edx
mov edi, 0x80010ac0
xor ecx, ecx
mov al, byte [edi]
mov byte [esi + 0xc03c4], cl
inc edi
inc ecx
cmp edi, 0x80010ac5
mov byte [esi + 0xc03c5], al
jb 0x8003b72c
mov edi, 0x80010ab4
xor ecx, ecx
mov al, byte [edi]
mov byte [esi + 0xc03ce], cl
inc edi
inc ecx
cmp edi, 0x80010abd
mov byte [esi + 0xc03cf], al
jb 0x8003b74b
mov edi, 0x80010a9c
lea eax, [esi + 0x6013c0]
mov cl, byte [edi]
mov byte [eax], dl
inc edi
inc edx
cmp edi, 0x80010ab1
mov byte [eax], cl
jb 0x8003b76e
and dword [ebp + 8], 0
mov byte [eax], 0x20
mov eax, dword [ebp - 0x28]
imul eax, eax, 0x22
lea eax, [eax - 0x7ffe8e00]
lea ecx, [eax + 0x22]
cmp eax, ecx
mov byte [esi + 0x6013d4], 0x11
mov byte [esi + 0x6013d5], 0
mov dword [ebp - 0xc], ecx
jae 0x8003b837
mov dword [ebp - 0x14], 0x80017200
sub dword [ebp - 0x14], eax
mov edi, eax
cmp byte [0x80060ba2], 1
mov eax, dword [ebp - 0x14]
mov al, byte [eax + edi]
mov cl, byte [edi]
mov byte [ebp - 2], al
mov byte [ebp - 1], cl
jne 0x8003b7f4
lea eax, [ebp - 2]
push eax
push dword [ebp + 8]
push 5
call fcn.8003a4a9
lea eax, [ebp - 1]
push eax
xor eax, eax
mov al, byte [ebp + 8]
add al, 0x22
push eax
push 5
call fcn.8003a4a9
mov al, byte [ebp - 2]
cmp al, 0x13
jne 0x8003b800
mov cl, byte [ebp + 0x18]
mov byte [ebp - 1], cl
jmp 0x8003b81f
cmp al, 0x19
jne 0x8003b80f
mov ecx, dword [ebp + 0x18]
shr ecx, 3
and cl, 0xe0
jmp 0x8003b81c
cmp al, 0x25
jne 0x8003b81f
mov ecx, dword [ebp + 0x18]
shr ecx, 6
and cl, 0x20
or byte [ebp - 1], cl
inc dword [ebp + 8]
mov cl, byte [ebp - 1]
inc edi
cmp edi, dword [ebp - 0xc]
mov byte [esi + 0x6013d4], al
mov byte [esi + 0x6013d5], cl
jb 0x8003b7b9
mov eax, dword [ebp - 0x2c]
not eax
and eax, 1
mov dword [esi + 0x6806a0], eax
xor eax, eax
mov al, byte [ebp + 0x17]
mov edi, 0x80
mov byte [esi + 0x6013d4], 0x28
or eax, edi
mov byte [esi + 0x6013d5], al
xor ecx, ecx
lea eax, [esi + 0x6013da]
test byte [eax], 8
jne 0x8003b866
test byte [eax], 8
je 0x8003b86b
inc ecx
cmp ecx, 3
jb 0x8003b866
cmp byte [0x80060ba2], 1
mov eax, dword [ebp - 0x20]
mov eax, dword [eax*4 - 0x7ffef5b0]
mov dword [ebp - 0x24], eax
jne 0x8003b899
lea eax, [ebp - 0x24]
push eax
push 0
push 6
call fcn.8003a4ca
mov eax, dword [ebp - 0x24]
mov dword [esi + 0x680880], eax
push 1
call sym.xboxkrnl.exe_Ordinal_151
lea eax, [ebp + 0x18]
push eax
push 0
push 0xc
push ebx
call sym.xboxkrnl.exe_Ordinal_45
mov al, byte [ebp + 0x18]
mov byte [ebp - 1], al
movzx eax, al
or eax, edi
push eax
xor edi, edi
push edi
push 0xc
push ebx
call sym.xboxkrnl.exe_Ordinal_50
movzx eax, byte [ebp - 3]
or eax, 0x20
push eax
push edi
push 0xba
push ebx
call sym.xboxkrnl.exe_Ordinal_50
mov eax, dword [ebp + 0x1c]
push esi
mov dword [esi + 0x600800], eax
call fcn.8003a01a
cmp byte [0x80060ba2], 1
jne 0x8003b902
push edi
push 0x60
call fcn.8003a394
mov eax, dword [ebp + 0x10]
mov dword [0x80060b90], eax
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret 0x18