Function at 0x405912
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4c
mov eax, dword [ebp + 8]
xor edx, edx
mov dword [esp + 0x20], ecx
inc edx
mov ecx, dword [ebp + 0xc]
push ebx
push esi
xor ebx, ebx
mov dword [esp + 0x38], edx
mov esi, dword [ecx + 8]
and dword [esp + 0x10], ebx
and dword [esp + 0x34], ebx
push edi
mov dword [esp + 0x10], esi
xor edi, edi
or esi, 0xffffffff
mov dword [esp + 0x20], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x30], esi
cmp eax, 0x15
je 0x4441d1
cmp eax, 0x1d
ja 0x405981
movzx eax, byte [eax + 0x405ac0]
jmp dword [eax*4 + 0x405a8c]
mov eax, dword [esp + 0x10]
lea edx, [ebx + 6]
cmp eax, edx
ja 0x4442bc
lea edx, [ebx + 5]
cmp eax, edx
ja 0x4442d4
lea edx, [ebx + 4]
cmp eax, edx
jbe 0x4059b8
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
mov ecx, dword [ecx + edx*4]
call fcn.0040b565
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x10]
lea edx, [ebx + 3]
cmp eax, edx
jbe 0x4059d3
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
mov ecx, dword [ecx + edx*4]
call fcn.0040b565
mov esi, eax
mov eax, dword [esp + 0x10]
lea ecx, [ebx + 2]
cmp eax, ecx
jbe 0x4059f0
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 4]
mov ecx, dword [eax + ecx*4]
call fcn.0040b565
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x10]
lea ecx, [ebx + 1]
cmp eax, ecx
jbe 0x405a0a
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
mov ecx, dword [ecx + ebx*4 + 4]
call fcn.0040b565
mov dword [esp + 0x28], eax
sub esp, 0x10
lea eax, [esp + 0x40]
mov ecx, esp
push eax
and dword [ecx + 8], 0
call fcn.004100de
mov ebx, dword [esp + 0x24]
push edi
push dword [esp + 0x2c]
push dword [esp + 0x34]
push dword [esp + 0x3c]
push esi
push dword [esp + 0x48]
push dword [esp + 0x50]
push ebx
push dword [ebp + 8]
call fcn.00405adc
mov edi, dword [ebp + 0x10]
mov esi, eax
mov ecx, edi
call fcn.0040cf9e
mov ecx, edi
mov dword [edi + 0xc], 1
mov dword [edi], esi
call fcn.0040b565
test eax, eax
je 0x4442ef
cmp dword [ebp + 8], 0x1d
je 0x405a71
push ebx
call fcn.0041fe12
pop ecx
xor esi, esi
lea ecx, [esp + 0x30]
call fcn.0040cf9e
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
dec esp
jl 0x444219
adc byte [ebx], dh
scasd eax, dword es:[edi]
inc edi
add al, 0x5d
push es
xor ebp, dword [edi + 0x65d0447]
shr dword [eax], 1
jle 0x4441d5
sub ah, byte [esi - 0x2a496ce4]
shl dword [esi], 1
mov bl, 0x9a
mov eax, 0xb037d94a
leave
inc esi
sub dword [esi - 0xe8b9bee], eax
jecxz 0x44425b
jno 0x44425b
ror dword [ebx - 0x4876caa8], 0x31
sahf
xchg edx, eax
adc eax, 0xa183d63b
rol dword [eax], 0x66
sal byte [esi - 0x66], cl
sbb edx, dword [eax + esi + 0x76]
mov dl, 0x45
wait
push ss
cli
call 0x1cd96833
div dl
fsubr qword [eax - 0x616a4c1b]
xchg dword [ebx - 0x1c], edi
enter 0x1de2, 0x55
test byte [esi + 0x28], al
push ss
adc eax, dword [ebp - 0x1e]
cmpsb byte [esi], byte es:[edi]
rcl ch, cl
lodsb al, byte [esi]
and esp, dword [ebx]
inc esp
inc edx
push ebx
shr dword [ecx - 0x1111f5ca], 0x96
nop
xchg dl, dl
invalid
mov byte [0x8f297a63], al
loope 0x4442a0
xlatb
adc dl, 0x4a
sbb al, 0x61
mov ebx, 0x75d39469
ret 0xe1e5
adc eax, 0x925d3331
cmp al, 0xe8
xlatb
sub eax, 0xd7d989f3
mov ecx, ebx
xlatb
outsb dx, byte [esi]
push ebx
out 0x51, eax
imul cl
dec esp
and byte [edx - 0x69de2fb0], ah
push cs
out dx, al
add esp, dword [ebx + 0x11]
jb 0x4442d9
ljmp 0x39bc:0xcecbaef1
into
mov esp, 0x42d78139
xlatb
rcl dword [esi], 0x8d
invalid
test byte [ebp - 0x37], bh
xor eax, 0xce34f66
dec di
jecxz 0x4442e9
in al, 0xf8
adc dl, byte [esp + ecx*8 - 0x63b377a1]
iretd
dec esi
cwde
xchg esp, eax
ret
inc ecx
inc eax
mov dl, 0x89
ror dword [eax], cl
cmc
je 0x444296
mov ebx, dword [ebp + 8]
adc byte [eax], bh
push esp
inc esp
jno 0x444369
lds edx, [edx + eax*8]
stosb byte es:[edi], al
int1
inc edi
mov byte [0x485e21ba], al
std
cli
add dl, byte [ebp - 0x4a]
or ch, ch
xchg ecx, eax
mov esi, 0x7026c198
mov bh, 7
push es
add eax, 0xd58eaf60
inc edx
and ebx, dword [edx + 0x36]
in eax, 0xba
sal dh, 0xc3
mov ecx, 0x6c4c55a9
nop
push ebx
invalid
stosd dword es:[edi], eax
lodsb al, byte [esi]
popal
mov eax, dword [0x6a12f545]
add bl, ah
sal dword [ebx], 0xd0
mov ebp, cs
push edi
mov eax, edi
in al, dx
add esi, edx
test dword [ecx], 0xd2a2b5d4
nop
mov edx, 0xb4bce34c
mov byte [0xb6d38f08], al
or byte [edx - 0x429dae9c], ch
mov dl, 0xe9
pop esi
adc eax, dword [ecx - 0x3a]
dec ebx
and ebx, dword [ecx]
test dword [ecx - 0x1e], ebx
ret 0xc299