Function at 0x5be506
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
cmp byte [edi + 0x3a], 0
jne 0x5be698
movzx ebx, word [esi + 0x86]
lea eax, [ebp - 0x34]
push eax
push dword [edi]
call dword [0x49c640]
mov eax, dword [edi + 0x44]
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x28]
mov dword [ebp + 0xc], eax
mov eax, dword [edi + 0x48]
mov dword [ebp + 0x10], edx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], eax
test edx, edx
je 0x5fd058
test ecx, ecx
je 0x5fd072
cmp dword [edi + 0x19c], 0
jne 0x5fd085
lea eax, [ebp - 0x34]
push eax
push dword [esi]
call dword [0x49c6a0]
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x34]
sub eax, ecx
mov edx, dword [ebp - 0x28]
mov dword [ebp + 8], eax
mov eax, dword [ebp - 0x30]
sub edx, eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x1c]
push eax
push dword [edi]
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x1c], ecx
call dword [0x49c758]
mov eax, dword [ebp - 0x1c]
imul eax, dword [ebp + 0xc]
mov edi, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
cdq
idiv dword [ebp + 0x10]
mov word [esi + 0x88], ax
mov eax, dword [ebp - 0x18]
imul eax, edi
cdq
idiv ecx
mov word [esi + 0x8a], ax
mov eax, dword [ebp + 8]
imul eax, dword [ebp + 0xc]
cdq
idiv dword [ebp + 0x10]
mov word [esi + 0x8c], ax
mov eax, dword [ebp - 0x10]
imul eax, edi
cdq
idiv ecx
mov word [esi + 0x8e], ax
test bx, bx
je 0x5be691
test ebx, 0x100
je 0x5be624
mov eax, dword [ebp + 8]
movzx eax, ax
mov word [esi + 0x8c], ax
test bl, 6
jne 0x5be624
test bl, 8
jne 0x5fd095
mov eax, dword [ebp + 0x10]
cdq
sub eax, edx
mov edx, dword [ebp - 0x1c]
sar eax, 1
cmp edx, eax
jg 0x5fd0b4
test ebx, 0x200
je 0x5fd118
mov eax, dword [ebp - 0x10]
movzx eax, ax
mov word [esi + 0x8e], ax
test bl, 0x60
jne 0x5fd118
test bl, bl
js 0x5fd0de
mov eax, ecx
cdq
sub eax, edx
mov edx, dword [ebp - 0x18]
sar eax, 1
cmp edx, eax
jg 0x5fd0fa
mov ecx, dword [ebp - 0x1c]
mov eax, ebx
and eax, 2
mov dword [ebp - 0x14], eax
jne 0x5fd120
test bl, 4
jne 0x5fd12c
mov eax, ebx
and eax, 0x20
mov dword [ebp + 0x10], eax
jne 0x5fd188
test bl, 0x40
jne 0x5fd194
pop edi
pop esi
pop ebx
leave
ret 0xc
cmp byte [esi + 0x90], 7
mov ax, word [edi + 0x58]
mov word [esi + 0x88], ax
mov ax, word [edi + 0x5c]
mov word [esi + 0x8a], ax
je 0x5be71c
mov ax, word [edi + 0x60]
mov word [esi + 0x8c], ax
mov ax, word [edi + 0x64]
mov word [esi + 0x8e], ax
lea eax, [ebp - 0x24]
push eax
push dword [esi]
call dword [0x49c640]
or ebx, 0xffffffff
cmp dword [edi + 0x58], ebx
je 0x5fd026
cmp dword [edi + 0x5c], ebx
je 0x5fd036
lea eax, [ebp - 0x24]
push eax
push dword [esi]
call dword [0x49c6a0]
cmp dword [edi + 0x60], ebx
je 0x5fd046
cmp dword [edi + 0x64], ebx
je 0x5be711
cmp byte [esi + 0x90], 0
jne 0x5be691
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x20]
jmp 0x5fd1ba
cmp byte [ebp + 0x10], 0
je 0x5be6cd
jmp 0x5be6b7
mov ch, 0xac
adc byte [edx - 0x3df87148], 0xf3
test al, 0x7d
stosd dword es:[edi], eax
push edx
mov al, 0x4d
cli
cmp al, 0x61
push ds
and bl, dh
scasb al, byte es:[edi]
add dword [edx + 0x3a2acf8d], 0xefffea80
out dx, eax
int 0x33
xchg byte [ecx + 0x6e4e952b], ch
xchg ebp, eax
dec esi
outsb dx, byte [esi]
inc eax
push esi
pop ebp
call 0x5fad3b08
out 0x93, eax
in eax, 0x11
mov fs, word [esi + ebp*4 - 0x674c973c]
scasd eax, dword es:[edi]
scasb al, byte es:[edi]
push 0xaeaf98b3
out 0xd0, al
stc
xor ebp, 0x97bbaf80
or al, byte [ebp - 0x58d2e08c]
je 0x5fd0b6
sub eax, 0x7d743fa7
aas
je 0x5fd119
adc eax, ebp
inc eax
arpl word [esi - 0x5b], bx
je 0x5fd099
shr dword [edi], 0x48
jg 0x5fd0a8
jmp [ebp + 0x7bd18717]
lodsd eax, dword [esi]
pop ss
xchg ecx, edx
jnp 0x5fd042
outsd dx, dword fs:[esi]
dec ebp
sahf
push ss
adc al, 0xa8
xor edx, dword [eax - 0x3d]
sbb ebp, dword [ebx - 0x2196b1bd]
mov ch, 0xf2
stosb byte es:[edi], al
dec edi
imul ebx, esi, 0x4faaf2b5
mov ebp, 0x761d4d90
invalid
sbb cl, byte [esi]
popfd
retf
adc eax, 0x90ec0036
rep movsb byte es:[edi], byte [esi]
adc word [ebp + 0x50], 0x43
mov eax, 0xc8020092
push ecx
fimul word [ebp - 0x519a62a9]
sahf
xor al, 0x53
jbe 0x5fd172
push eax
jo 0x5fd0a7
lea esi, [ebp - 0x42cd0cc3]
push cs
mov ch, 0x3d
xor bh, byte [ebp + 0x733b8c0e]
test al, 0xb7
and ebx, 0xffffffa4
rcr byte [0x658edf1d], 1
jo 0x5fd0bd
invalid
mov fs, word [ebp + 0x70]
invalid
clc
and cl, ah
aaa
ror byte [edx], 0xb2
wait
sbb ebp, dword [esp + edx*4]
jg 0x5fd10b
sbb byte [edi], bh
sub bh, byte [edi - 0x13]
in eax, dx
cmp dword [edi - 0x6f2a71fa], ebp
xor edx, ecx
xchg ebp, eax
xor al, 0x8f
wait
push cs
pop esi
inc edx
ret
adc al, 0x1e
inc edx
jo 0x5fd184
pop esp
push ds
sbb byte [edx], al
pop eax
arpl word [edi - 0x42], ax
jge 0x5fd1e1
pushal
sal cl, 0x77
cli
ja 0x5fd180
or dword [esi + eax*8 - 0x6d3e8972], 0x3dadc9fc
cmp eax, 0x3143a9aa
mov al, 0xbc
enter 0x370, 0xa
invalid
inc ebx
xor dword [eax + 0x70c8f2bc], esi
add ecx, dword [edx]
outsb dx, byte [esi]
lea ecx, [edx - 0x62ecad7c]
arpl word [eax - 0x50], dx
xor byte [esi + 0x402c4f4b], ch
dec ebx
mov ch, 0xa2
and ebx, dword [edi + 0x39]
pushal
loopne 0x5fd205
push eax
int 0x26
jl 0x5fd21a
pop edi
adc esp, dword [edx - 0x20]
mov ds, esp
mov bl, 0xed
cmc
les ebp, [edx]
into
mov al, 0x13
or byte [esi + 0x3be73e1f], ah
add ebx, dword [ebp - 0x2285a660]
sbb byte [edx], ch
mov dword [edx + 0x43], eax
push esi
int3
movsd dword es:[edi], dword [esi]
pop esi
adc eax, 0x705d7963
dec eax