Function at 0x405dd0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push edi
push esi
push ebx
mov dword [ebp - 4], eax
mov eax, 0x13
cmp cl, 0
jne 0x405d6b
mov eax, dword [ebp + 0xc]
cmp eax, 2
jge 0x405d61
mov eax, 2
cmp eax, 0x12
jle 0x405d6b
mov eax, 0x12
mov dword [ebp + 0xc], eax
push eax
mov eax, 0x270f
cmp byte [ebp + 0x10], 2
jb 0x405d7d
mov eax, dword [ebp + 8]
push eax
lea eax, [ebp - 0x1c]
call fcn.004062da
mov edi, dword [ebp - 4]
movzx eax, word [ebp - 0x1c]
sub eax, 0x7fff
cmp eax, 2
jae 0x405da7
lea esi, [eax + eax*2 + 0x405d38]
mov ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x405dca
lea esi, [ebp - 0x19]
movzx ebx, byte [ebp + 0x10]
cmp bl, 1
je 0x405dc3
cmp bl, 4
ja 0x405dc1
movsx eax, word [ebp - 0x1c]
cmp eax, dword [ebp + 0xc]
jle 0x405dc3
mov bl, 0
call dword [ebx*4 + 0x405dd8]
mov eax, edi
sub eax, dword [ebp - 4]
pop ebx
mov ecx, 0x5d0bfd50
xor ecx, 0x1120fcb9
push 0x14b2c3ff
mov ebx, 0x76c948da
pop esi
xor ebx, esi
xor ebx, ecx
mov ecx, 0xc8451
mov esi, 0x48905308
xor ecx, esi
xor ebx, ecx
mov edi, 0x668c8cfd
xor ebx, edi
mov ecx, ebx
mov esi, 0x6c06ac5e
mov edx, 0x93f953a1
xor edx, esi
add ecx, edx
mov eax, dword [ecx + 1]
mov ebx, 0x595dfa80
xor ebx, 0x296cafdf
push ebx
mov ebx, 0x5b8e294a
mov edi, 0xe196560
xor edi, ebx
pop esi
xor edi, esi
add esp, 0xfffffffc
mov ebx, esp
mov dword [ebx], edi
mov ecx, 4
mov esi, 0x1220000
xor ecx, esi
mov ebx, 0x40110
mov edi, 0x24801861
xor ebx, edi
xor ecx, ebx
pop edx
xor ecx, edx
mov esi, 0xfffffffc
add esp, esi
mov ebx, 0
xor ebx, esp
mov dword [ebx], ecx
push esp
pop esi
push esi
pop ebx
mov edx, 0xfffffffc
add esp, edx
mov ecx, 0
xor ecx, esp
mov dword [ecx], ebx
mov edi, 0
mov edx, 0x40
xor edi, edx
push 0x6567e316
mov ecx, 0x6567e316
pop edx
xor ecx, edx
xor edi, ecx
mov ecx, 0x365f846f
mov ebx, 0x365f846f
xor ebx, ecx
push 0x1ff5c0bf
mov edx, 0x1ff5c0bf
pop esi
xor edx, esi
xor ebx, edx
xor edi, ebx
mov edx, 0xfffffffc
add esp, edx
push esp
pop ecx
mov dword [ecx], edi
mov edi, 0x684e7035
xor edi, 0x6d41881e
push edi
mov ebx, 0x7283a748
xor ebx, 0x96fc74f
pop edx
xor ebx, edx
push 0x49b41b8f
mov ecx, 0x375717a3
pop edi
xor ecx, edi
xor ebx, ecx
add esp, 0xfffffffc
xor edx, edx
add edx, esp
mov dword [edx], ebx
mov esi, 0x1000
mov ebx, 0
xor esi, ebx
mov ebx, 0x758a6210
mov edi, 0x758a6210
xor edi, ebx
xor esi, edi
mov edx, 0xc801125
mov ebx, 0x40420092
xor edx, ebx
mov ebx, 0x37aa862b
xor edx, ebx
xor edx, 0x7b28979c
xor esi, edx
mov ebx, esi
mov edi, 4
sub esp, edi
mov dword [esp], ebx
call eax
pop ecx
push 0x53b2296
mov esi, 0x4075a50b
pop eax
xor esi, eax
push 0x6e5742f8
mov edi, 0x71b47cea
pop ecx
xor edi, ecx
xor edi, esi
push 0x329c844a
mov eax, 0x56617b0a
pop ecx
xor eax, ecx
mov esi, 0x36354e6e
mov ebx, 0x8650b84
xor ebx, esi
xor ebx, eax
xor ebx, edi
mov eax, 0x72f77659
xor eax, 0x4ca81e5a
mov ecx, eax
xor ecx, 0xffffffff
and ecx, 0x6b659810
and eax, 0x949a67ef
or eax, ecx
mov edx, 0x11a80e0
mov esi, 0x40241211
xor edx, esi
push edx
mov edi, 0x4000602
mov edx, 0x10440040
xor edi, edx
pop ecx
xor edi, ecx
xor edi, eax
push 0x74d02150
mov eax, 0x2e7ebd67
pop ecx
xor eax, ecx
push 0x10ae121d
mov esi, 0x5853db98
pop edx
xor esi, edx
xor esi, eax
mov ecx, 0x7eae9cd6
xor ecx, 0x6cbd4585
xor esi, ecx
mov edx, ebx
mov eax, edx
mov ecx, 0
xor ecx, eax
xor eax, eax
add eax, ecx
mov edx, eax
push edx
xor ecx, ecx
add ecx, esi
xor eax, eax
add eax, ecx
push 0x597c4f92
mov ecx, 0x597c4f96
pop edx
xor ecx, edx
sub esp, ecx
mov dword [esp], eax
xor ebx, ebx
mov bl, byte [edi]
add esi, ebx
mov bl, byte [esi]
pop esi
mov byte [edi], bl
dec edi
pop ebx
dec ebx
mov eax, ebx
or eax, ebx
jne 0x405fcf
push 0x64262612
mov esi, 0x64262722
pop ebx
xor esi, ebx
push 0x2d2d7666
mov eax, 0x2d2d7626
pop ecx
xor eax, ecx
xor esi, eax
mov edx, 0x5024b44
mov eax, 0x2190481
xor edx, eax
mov edi, 0x242358db
xor edx, edi
xor edx, 0x23787712
xor esi, edx
call esi
pop ebx
pop ebx
ret