Function at 0x415bd0
Capabilities:
Encode data using xor

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0xc]
push esi
push edi
mov eax, dword [ebp]
dec eax
cmp eax, 3
ja case.default.0x415be5
jmp dword [eax*4 + 0x415db0]
mov eax, dword [ebp + 4]
lea esi, [ebp + 0x3c]
mov ecx, dword [ebp + 0x38]
sub eax, 1
je 0x415c66
sub eax, 1
je 0x415c0b
pop edi
pop esi
mov ebx, 0x1001
pop ebp
mov eax, ebx
pop ebx
ret
mov ebx, 0x10
sub ebx, ecx
push ebx
movsx eax, bl
push eax
lea eax, [ebp + 0x28]
add eax, ecx
push eax
call fcn.00562660
add esp, 0xc
cmp ebx, 0x10
ja 0x415c82
test ebx, ebx
je 0x415c76
mov ecx, dword [esp + 0x18]
mov eax, dword [ebp + 0x28]
push ecx
push esi
mov dword [ecx], eax
mov eax, dword [ebp + 0x2c]
mov dword [ecx + 4], eax
mov eax, dword [ebp + 0x30]
mov dword [ecx + 8], eax
mov eax, dword [ebp + 0x34]
mov dword [ecx + 0xc], eax
call fcn.00416280
mov eax, dword [esp + 0x24]
add esp, 8
xor ebx, ebx
pop edi
pop esi
mov dword [eax], 0x10
mov eax, ebx
pop ebp
pop ebx
ret
test ecx, ecx
je 0x415c76
pop edi
pop esi
mov ebx, 0x1004
pop ebp
mov eax, ebx
pop ebx
ret
mov eax, dword [esp + 0x1c]
xor ebx, ebx
mov dword [eax], 0
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
ret
mov eax, dword [ebp + 4]
lea edi, [ebp + 0x3c]
mov ecx, dword [ebp + 0x38]
sub eax, 1
je 0x415c66
sub eax, 1
jne 0x415bff
mov ebx, 0x10
sub ebx, ecx
push ebx
movsx eax, bl
push eax
lea eax, [ebp + 0x28]
add eax, ecx
push eax
call fcn.00562660
add esp, 0xc
cmp ebx, 0x10
ja 0x415c82
test ebx, ebx
je 0x415c76
mov eax, dword [ebp + 0x28]
xor eax, dword [ebp + 0x18]
mov esi, dword [esp + 0x18]
push esi
push edi
mov dword [esi], eax
mov eax, dword [ebp + 0x2c]
xor eax, dword [ebp + 0x1c]
mov dword [esi + 4], eax
mov eax, dword [ebp + 0x30]
xor eax, dword [ebp + 0x20]
mov dword [esi + 8], eax
mov eax, dword [ebp + 0x34]
xor eax, dword [ebp + 0x24]
mov dword [esi + 0xc], eax
call fcn.00416280
mov eax, dword [esi]
add esp, 8
mov dword [ebp + 0x18], eax
xor ebx, ebx
mov eax, dword [esi + 4]
mov dword [ebp + 0x1c], eax
mov eax, dword [esi + 8]
mov dword [ebp + 0x20], eax
mov eax, dword [esi + 0xc]
mov dword [ebp + 0x24], eax
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
mov dword [eax], 0x10
mov eax, ebx
pop ebx
ret
mov ebx, dword [esp + 0x1c]
lea esi, [ebp + 0x18]
mov edi, dword [ebp + 0x38]
lea eax, [ebp + 0x3c]
push esi
push eax
mov dword [ebx], 0x10
call fcn.00416280
add esp, 8
test edi, edi
je 0x415d59
mov ecx, dword [esp + 0x18]
mov edx, edi
mov al, byte [esi + 0x10]
lea esi, [esi + 1]
xor al, byte [esi - 1]
lea ecx, [ecx + 1]
mov byte [ecx - 1], al
sub edx, 1
jne 0x415d45
mov dword [ebx], edi
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov edi, dword [esp + 0x1c]
lea esi, [ebp + 0x18]
mov ebx, dword [ebp + 0x38]
lea eax, [ebp + 0x3c]
push esi
push eax
mov dword [edi], ebx
call fcn.00416280
mov eax, dword [ebp + 0x28]
xor dword [esi], eax
mov eax, dword [ebp + 0x2c]
xor dword [ebp + 0x1c], eax
mov eax, dword [ebp + 0x30]
xor dword [ebp + 0x20], eax
mov eax, dword [ebp + 0x34]
xor dword [ebp + 0x24], eax
push ebx
push esi
push dword [esp + 0x28]
call fcn.005620e0
add esp, 0x14
mov dword [edi], ebx
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
mov eax, 0x1001
pop ebx
ret