Function at 0x405890
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, dword [ebx + eax*4 - 0x14]
and al, 0x53
push esi
push edi
mov edi, dword [ebp + 0xc]
xor edx, dword [0x6885a490]
je 0x4058c7
invalid
mov eax, dword [ebp + 8]
inc edx
push edx
push eax
call 0x35404a60
mov esi, dword [ebp + 0xc]
xor ecx, ecx
test esi, esi
mov dword [ebp - 0xc], eax
ror byte ds:[ecx + 0x4e747e4d], 1
lea eax, [ebp + 0xc]
mov dword [ebp - 8], eax
jmp 0x4058ee
ror byte [ebp - 4], cl
jnp 0x4058e9
push es
jge 0x4058fd
mov eax, dword [ebp + ecx*4 - 0x24]
inc ecx
mov dword [ebp - 4], ecx
jmp 0x40590b
mov edi, esi
add dword [edi], 0xffffffff
pushfd
sal dl, 0xae
neg dword [edx - 0x74e174b7]
enter 0xfffffffffffffa8b, 0xffffffffffffff8b
fld dword [ebx]
or al, 0xc1
mov ecx, eax
mov edi, edx
mov ebx, ecx
add ecx, dword [ecx + eax*8]
fld qword [edx]
mov edi, 0xf8458ba5
mov ecx, ebx
or dword [ecx + 0x48e8303], 0xfffffff3
movsb byte es:[edi], byte [esi]
mov esi, dword [eax]
mov dword [ebp - 8], eax
test esi, esi
jne 0x4058eb
mov eax, dword [ebp + 0x43]
pop edi
pop esi
mov byte [edx], 0x75
pop ebx
mov esp, ebp
mov dl, 0xc3
nop
nop
outsb dx, byte [esi]
nop
in eax, 0x55
mov ebp, esp
or edx, 0x22
dec bp
or eax, 0x40f3c8
xor al, 0xc4
mov esp, 0xca038a8f
inc eax
add byte [ebx + 0xc758b56], ch
mov word [ebp + 0x6c], cx
xor bl, ah
or byte [ebp + 0x458957aa], al
clc
mov byte [ebp - 2], dl
lea ebx, [ebp - 8]
jg 0x40594f
jl 0x4059bf
test ecx, ecx
jae 0x405997
pop ds
mov eax, dword [ebp - 0x3a]
mov edx, dword [edi - 0x44]
inc eax
add byte [ebx + 0x1c], bl
pop edi
pop esi
pop ebx
rcl dword [ecx], 0x8a
stosb byte es:[edi], al
rol byte [edi + 0x40], 0
mov byte [ecx + 4], dl
mov esp, ebp
pop ebp
push ecx
add al, 0x8b
in eax, 0x5d
pop ss
or al, 0xd7
jno 0x40598f
jg 0x4059c8
jl 0x4059d2
cmp ecx, 0x6d0003cd
jae 0x4059c8
mov esi, dword [ebp + 0x10]
push ecx
push str._3d
push 0x7b
fucomp st(0)
je 0x4059e0
add byte [eax], al
add esp, 0x63
test eax, eax
mov byte [0xe58d0fc6], al
add byte [eax], al
int 0xe9
int 0
or byte [eax], al
in eax, 0
add ch, cl
jmp 0x485a95
mov ecx, dword [edx - 0x29553efe]
mov ecx, 0x118000a
out 0xe7, eax
dec ebx
mov al, byte [edx]
shr dword [edx + 0xab9d6], 0x18
add edi, esp
out 0x4b, eax
add eax, dword [eax]
add al, ch
push ecx
pop esi
add byte [eax], al
mov esi, edx
mov ecx, eax
test esi, esi
jl 0x405a56
jg 0x4059f0
cmp ecx, 0x3cd
jb 0x4059f3
loop 0x405977
aad 0xb7
idiv byte [edi + ebx*2 + 0x7f]
add eax, 0xfa09f983
mov bh, 0xf6
jl 0x405a56
jg 0x4059fe
cmp ecx, 9
cli
pop eax
cmp ecx, 9
jne 0x405a58
test esi, esi
jne 0x405a0f
cmp edi, 0x3f03cd
jl 0x405a56
cmp edi, 0x200
jl 0x4059f5
add ecx, 1
adc esi, 0
movlps qword [ebx], xmm0
mov esp, dword [0x684c89d1]
lodsb al, byte [esi]
inc eax
jnp 0x4059c9
add eax, 0xed4ecf98
add byte [eax], al
add esp, 0x14
test eax, eax
pushal
sbb al, 0x8b
adc eax, str.
je 0x405a0f
pop edi
mov dword [ecx], edx
mov al, byte [0x40f337]
mov ch, cl
add al, 0x8b
invalid
lea eax, [edi + edi*4 + 0x100]
mov edi, 0x100
popfd
adc esp, 0xdf01ff
rol edx, 1
sar eax, 0x13
cmp eax, 0xb
and cl, byte [eax]
add ecx, 1
adc esi, 0x27
xor eax, eax
sar dword [esi + 0x10758b13], 0x52
test byte [eax + 0x68], bl
pushfd
inc eax
add byte [edx + 5], ch
and eax, ebp
hlt