Function at 0x50910c
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffed4
push ebx
xor ebx, ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x12c], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x5095b8
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, 1
mov eax, dword [ebp - 4]
call fcn.00508470
test al, al
jne 0x509199
lea eax, [ebp - 0x20]
push eax
lea edx, [ebp - 0x128]
mov eax, dword [ebp - 4]
mov eax, dword [eax]
call fcn.0040306c
lea eax, [ebp - 0x128]
mov dword [ebp - 0x28], eax
mov byte [ebp - 0x24], 4
lea eax, [ebp - 0x28]
push eax
lea edx, [ebp - 0x12c]
mov eax, dword [0x730914]
call fcn.004069d4
mov eax, dword [ebp - 0x12c]
xor ecx, ecx
pop edx
call fcn.0040b424
mov edx, dword [ebp - 0x20]
mov eax, 3
call fcn.005082d0
mov eax, dword [ebp - 8]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 0x14]
cmp eax, 7
ja case.default.0x5091b5
jmp dword [eax*4 + 0x5091bc]
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x14]
je 0x509211
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
call fcn.0040296c
jmp 0x509211
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x30]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
add dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
sub dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x24]
jge 0x5091f4
cmp dword [ebp + 8], 0
jle case.default.0x5091b5
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2c]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
call fcn.0040296c
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2c]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2c]
mov ecx, dword [ebp + 8]
call fcn.0040296c
jmp case.default.0x5091b5
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x14]
je 0x509271
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
call fcn.0040296c
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2c]
mov dword [ebp - 0x1c], eax
jmp 0x5092de
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x24]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
call fcn.005074b4
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x30]
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x24]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
call fcn.005074b4
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
add dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
sub dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x24]
jge 0x509285
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x34]
je 0x509308
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x34]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x24]
call fcn.0040296c
cmp dword [ebp + 8], 0
jle case.default.0x5091b5
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x24]
call fcn.0040296c
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2c]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2c]
call fcn.005074b4
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
push eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x24]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x34]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2c]
call fcn.005074b4
jmp case.default.0x5091b5
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x14]
je 0x509385
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
call fcn.0040296c
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2c]
mov dword [ebp - 0x1c], eax
jmp 0x5093ee
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x24]
call fcn.0040296c
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x30]
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x24]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
call fcn.005074b4
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
add dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
sub dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x24]
jge 0x509399
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x34]
je 0x509418
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x34]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x24]
call fcn.0040296c
cmp dword [ebp + 8], 0
jle case.default.0x5091b5
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x24]
call fcn.0040296c
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2c]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2c]
mov eax, dword [ebp - 0x14]
call fcn.005074b4
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
push eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x24]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x34]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2c]
call fcn.005074b4
jmp case.default.0x5091b5
cmp dword [ebp + 8], 0
jle case.default.0x5091b5
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x24]
call fcn.0040296c
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2c]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x24]
dec ecx
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x34]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
inc eax
call fcn.0040296c
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x24]
mov ecx, dword [ebp - 0x10]
mov cl, byte [ecx]
mov byte [eax + edx - 1], cl
mov eax, dword [ebp - 0x10]
mov al, byte [eax]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x2c]
xor al, byte [edx]
mov edx, dword [ebp - 0x14]
mov byte [edx], al
inc dword [ebp - 0x14]
inc dword [ebp - 0x10]
dec dword [ebp + 8]
cmp dword [ebp + 8], 0
jg 0x509489
jmp case.default.0x5091b5
cmp dword [ebp + 8], 0
jle case.default.0x5091b5
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x24]
call fcn.0040296c
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2c]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov eax, dword [ebp - 0x10]
mov al, byte [eax]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x2c]
xor al, byte [edx]
mov edx, dword [ebp - 0x14]
mov byte [edx], al
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x24]
dec ecx
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x34]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
inc eax
call fcn.0040296c
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x24]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x2c]
mov cl, byte [ecx]
mov byte [eax + edx - 1], cl
inc dword [ebp - 0x14]
inc dword [ebp - 0x10]
dec dword [ebp + 8]
cmp dword [ebp + 8], 0
jg 0x50950c
jmp case.default.0x5091b5
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.00508b18
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5095bf
lea eax, [ebp - 0x12c]
call fcn.00403ec4
lea eax, [ebp - 0x20]
call fcn.00403ec4
ret