Function at 0x408d54
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
test edi, edi
jne 0x408d71
cmp dword [ebx + 0x2c], 0
jne 0x408d76
mov edi, ebx
mov dword [ebp + 0xc], edi
cmp dword [edi + 0x1c], ebx
je 0x408d7e
pop edi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push 0x40
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x18], 0
mov dword [ebx + 0x2e4], 0
mov dword [ebx + 0x2e8], 0
mov dword [ebp - 0x10], 0x40
call fcn.00405534
mov esi, eax
add esp, 4
mov dword [ebp + 8], esi
test esi, esi
jne 0x408dd4
push 0x660558
call fcn.00407c14
add esp, 4
xor eax, eax
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx + 0x3c]
push edi
push ebx
mov dword [ebp - 4], esi
call eax
add esp, 8
mov dword [ebp - 0x14], eax
mov eax, dword [ebx + 0x2f0]
push ebx
call eax
mov edi, dword [ebp + 8]
add esp, 4
mov dword [ebp - 0x1c], eax
cmp esi, edi
jbe 0x408f12
cmp eax, 0x3c
je 0x408e0c
cmp eax, 0xffffffff
jne 0x408f1b
mov edi, dword [ebp - 0x14]
mov byte [esi], 0
cmp edi, 2
je 0x408e1c
cmp edi, 0xffffffff
jne 0x408e2a
push dword [ebp + 8]
call fcn.00406f94
add esp, 4
mov dword [ebp - 4], eax
push dword [ebp + 8]
xor esi, esi
call fcn.00406344
add esp, 4
test eax, eax
je 0x408f01
mov eax, edi
sub eax, 1
je 0x408eaf
sub eax, 1
je 0x408e93
sub eax, 1
jne 0x408f01
cmp dword [ebx + 0x44], esi
je 0x409501
mov edi, dword [ebp - 8]
mov dword [edi + 0x18], 3
push dword [ebp + 8]
mov eax, dword [ebx + 0x44]
push edi
push ebx
call eax
add esp, 0xc
test eax, eax
jne 0x408f01
push dword [edi]
push dword [ebp + 8]
push 0x6605a0
call fcn.00407c14
add esp, 0xc
jmp 0x409640
mov edi, dword [ebp - 8]
push 1
mov dword [edi + 0x18], 2
push dword [ebp + 8]
push edi
call fcn.0040a634
add esp, 0xc
test eax, eax
jmp 0x408efb
cmp dword [ebx + 0x2e8], esi
je 0x408ee6
push dword [ebp + 8]
call fcn.004065c4
mov edi, dword [ebp - 8]
add esp, 4
cmp byte [eax], 0
je 0x408ee9
cmp dword [edi + 0x18], esi
jne 0x408ee9
mov dword [edi + 0x18], 1
push dword [ebp + 8]
push edi
call fcn.00408aa4
add esp, 8
test eax, eax
jmp 0x408efb
mov edi, dword [ebp - 8]
push dword [ebp + 8]
push 0
push edi
call fcn.00408a44
mov esi, eax
add esp, 0xc
test esi, esi
je 0x409513
mov eax, dword [ebp - 0xc]
test eax, eax
mov edi, dword [ebp + 8]
cmove eax, esi
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x1c]
cmp eax, 0xffffffff
je 0x409612
cmp eax, 0x3c
jne 0x4094c2
mov eax, dword [ebx + 0x2f0]
push ebx
mov dword [ebp - 4], edi
call eax
mov esi, eax
add esp, 4
cmp esi, 0xffffffff
je 0x40904d
nop word [eax + eax]
push esi
call fcn.00407564
add esp, 4
test eax, eax
jne 0x40904d
cmp esi, 0x3e
je 0x40904d
cmp esi, 0x2f
jne 0x408f6e
cmp edi, dword [ebp + 8]
ja 0x40904d
jmp 0x408fce
cmp esi, 0x3c
je 0x40952b
cmp esi, 0x26
jne 0x408fb6
push dword [ebp - 8]
push ebx
call fcn.00409b04
add esp, 8
cmp eax, 0xffffffff
je 0x409640
lea ecx, [ebp - 0x10]
push ecx
lea ecx, [ebp + 8]
push ecx
lea ecx, [ebp - 4]
push ecx
push eax
call fcn.00408c34
add esp, 0x10
test eax, eax
je 0x409640
mov edi, dword [ebp - 4]
jmp 0x409036
cmp esi, 0x30
jge 0x408fce
cmp esi, 0x21
je 0x408fce
cmp esi, 0x2d
je 0x408fce
cmp esi, 0x2e
jne 0x409640
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 4]
push eax
push esi
call fcn.00408c34
add esp, 0x10
test eax, eax
je 0x409640
mov edi, dword [ebp - 4]
mov eax, edi
mov ecx, dword [ebp + 8]
sub eax, ecx
cmp eax, 1
jne 0x408fff
cmp byte [ecx], 0x3f
je 0x40904d
cmp dword [eax], 0xffffff94
daa
xchg edx, eax
inc edi
mov ah, 0xbc
imul ecx, dword [ebx], 0x31b10ad4
ret
or dword [eax], esi
push 0x52059dd6
xor al, 0x28
shr ah, 0x20
cmp byte [edi], ch
sbb dword [edx - 0x1fef9ce3], ebx
int3
aam 0x80
movsb byte es:[edi], byte [esi]
mov dl, 0x15
mov dword [eax - 0x41fed078], esp
cwde
xor eax, 0x75593341
ret 0xa12b
jnp 0x409526
test al, 0x3b
push cs
sub eax, 0xf8314496
inc esp
xor eax, edi
popal
jg 0x40952f
lcall 0x3c8a, 0x73035ee1
jb 0x409512
mov dword [0xd211ec74], eax
push ecx
push ebp
pushal
loopne 0x4094c9
sub byte [edx + 0x7f648539], cl
in eax, 0xc7
imul ebx, dword [ebx - 0x1bc67209], 0xb51c9939
sahf
retf
sbb ch, byte [edx + 0x8bd6bcd]
mov eax, dword [0xa8aa934a]
scasb al, byte es:[edi]
or dl, bl
je 0x409501
pop ss
cmpsb byte [esi], byte es:[edi]
stc
pop ecx
pop edx
inc edi
int1
pushal
and dh, byte fs:[ebx]
popfd
xor byte [ebx*4 - 0x3bdfc6e6], ch
xchg byte [ecx + 0x3d], bl
aam 0x85
sub dword [ecx], edi
movsd dword es:[edi], dword [esi]
ret
insd dword es:[edi], dx
push cs
call [eax + 0x795caebb]
push 0x3ee8b429
js 0x40956a
pop esp
jns 0x4095a0
sub dword [eax + ebp*8 - 0x67d387c2], esi
cwde
fidivr dword [eax + ebp*8 - 0x57]
mov ah, 0x28
inc ebp
mov word [ebp - 0x3bf23d57], fs
cmp eax, 0x88e470e4
aam 0xb1
xor byte [eax + 0x59], al
pop esp
inc esi
stosd dword es:[edi], eax
push esp
fst qword [ebx + esi*2]
cmc
fprem1
pop esi
jl 0x40952f
fcomp dword [ecx]
push ss
xchg ecx, eax
neg byte [ecx + 0x329df89c]
mov byte [ebp - 0x72b55b3f], ah
fcmove st(0), st(7)
add al, 0x1e
clc
popfd
xor cl, byte [eax + 0x4aa4c1a5]
invalid
shl dword [edx + ecx*2 + 0x4cfda8d], 0x1e
aam 0xac
jne 0x40956f
salc
sbb esi, esi
cwde
mov esp, 0x580104d8
mov bh, byte [edx + ebx*2 - 0x20]
and al, 0x8e
insd dword es:[edi], dx
pop ecx
wait
mov eax, 0x8b5e3728
out dx, eax
into
les esi, [edx]
mov dword [ecx], esi
mov esp, 0xd11fe415
jns 0x409535
mov eax, 0xa584d5ba
sbb byte [edi + 0x5cb201a2], al
cmp bh, al
retf
mov edx, 0x18a584d5
xchg dword [edx + 0x385cb201], esp
invalid
pop ebp
pop edi
clc
sbb ch, dl
sub al, 0xfb
or eax, 0x6e629c68
sti
jns 0x409670
adc ah, byte [edi + edx*2 + 0x13]
cmp eax, 0xf05d4c56
pushfd
mov esi, 0xd46c16f6
cld
not byte [esi]
insb byte es:[edi], dx
aam 0xfc
aad 0x7d
fisttp dword [eax + 4]
cmp ch, byte [edi + ebp*4]
dec edi
out 0x58, eax
cwde
lcall 0x58bb, 0x125ee29d
into
add cl, byte [ecx + ecx]
push 0x28f8d7f4
sbb dword [eax + 5], 0xddd17104
pop esi
adc bh, byte [ebx + 0xc02ce58]
or dword [eax - 0xc], ebp
xlatb
clc
sub byte [ecx + 0x71040558], al
rcr ebp, 1
pop eax
add eax, 0xddd17104
mov ecx, 0x7d807364
pop es
pop eax
popal
jo 0x40964e
sbb byte [edi - 0x1b4135], 0xb1
daa
movsd dword es:[edi], dword [esi]
popfd
sbb esp, 0x590fbfc
xor eax, 0xcd3b053f
in al, 0xc9
test al, 6
in eax, 0x44
jl 0x40962c
mov ch, 0x20
out 0xc0, eax
jns 0x4096d7
invalid
push ecx
mov edx, 0x28d0557d
cwde
dec esi
ljmp 0x2958