Function at 0x6151e6
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 0x615203
cmp dword [ebx + 0x2c], 0
jne 0x615208
mov edi, ebx
mov dword [ebp + 0xc], edi
cmp dword [edi + 0x1c], ebx
je 0x615210
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.006119c6
mov esi, eax
add esp, 4
mov dword [ebp + 8], esi
test esi, esi
jne 0x615266
push 0x660558
call fcn.006140a6
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 0x6153a4
cmp eax, 0x3c
je 0x61529e
cmp eax, 0xffffffff
jne 0x6153ad
mov edi, dword [ebp - 0x14]
mov byte [esi], 0
cmp edi, 2
je 0x6152ae
cmp edi, 0xffffffff
jne 0x6152bc
push dword [ebp + 8]
call fcn.00613426
add esp, 4
mov dword [ebp - 4], eax
push dword [ebp + 8]
xor esi, esi
call fcn.006127d6
add esp, 4
test eax, eax
je 0x615393
mov eax, edi
sub eax, 1
je 0x615341
sub eax, 1
je 0x615325
sub eax, 1
jne 0x615393
cmp dword [ebx + 0x44], esi
je 0x615993
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 0x615393
push dword [edi]
push dword [ebp + 8]
push 0x6605a0
call fcn.006140a6
add esp, 0xc
jmp 0x615ad2
mov edi, dword [ebp - 8]
push 1
mov dword [edi + 0x18], 2
push dword [ebp + 8]
push edi
call fcn.00616ac6
add esp, 0xc
test eax, eax
jmp 0x61538d
cmp dword [ebx + 0x2e8], esi
je 0x615378
push dword [ebp + 8]
call fcn.00612a56
mov edi, dword [ebp - 8]
add esp, 4
cmp byte [eax], 0
je 0x61537b
cmp dword [edi + 0x18], esi
jne 0x61537b
mov dword [edi + 0x18], 1
push dword [ebp + 8]
push edi
call fcn.00614f36
add esp, 8
test eax, eax
jmp 0x61538d
mov edi, dword [ebp - 8]
push dword [ebp + 8]
push 0
push edi
call fcn.00614ed6
mov esi, eax
add esp, 0xc
test esi, esi
je 0x6159a5
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 0x615aa4
cmp eax, 0x3c
jne 0x615954
mov eax, dword [ebx + 0x2f0]
push ebx
mov dword [ebp - 4], edi
call eax
mov esi, eax
add esp, 4
cmp esi, 0xffffffff
je 0x6154df
nop word [eax + eax]
push esi
call fcn.006139f6
add esp, 4
test eax, eax
jne 0x6154df
cmp esi, 0x3e
je 0x6154df
cmp esi, 0x2f
jne 0x615400
cmp edi, dword [ebp + 8]
ja 0x6154df
jmp 0x615460
cmp esi, 0x3c
je 0x6159bd
cmp esi, 0x26
jne 0x615448
push dword [ebp - 8]
push ebx
call int.00615f96
add esp, 8
cmp eax, 0xffffffff
je 0x615ad2
lea ecx, [ebp - 0x10]
push ecx
lea ecx, [ebp + 8]
push ecx
lea ecx, [ebp - 4]
push ecx
push eax
call fcn.006150c6
add esp, 0x10
test eax, eax
je 0x615ad2
mov edi, dword [ebp - 4]
jmp 0x6154c8
cmp esi, 0x30
jge 0x615460
cmp esi, 0x21
je 0x615460
cmp esi, 0x2d
je 0x615460
cmp esi, 0x2e
jne 0x615ad2
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 4]
push eax
push esi
call fcn.006150c6
add esp, 0x10
test eax, eax
je 0x615ad2
mov edi, dword [ebp - 4]
mov eax, edi
mov ecx, dword [ebp + 8]
sub eax, ecx
cmp eax, 1
jne 0x615491
cmp byte [ecx], 0x3f
je 0x6154df
cmp eax, 3
jne 0x6154ac
push eax
push 0x660610
push ecx
call 0x811f36
add esp, 0xc
test eax, eax
je 0x6154df
mov ecx, dword [ebp + 8]
mov eax, edi
sub eax, ecx
cmp eax, 8
jne 0x6154c8
push eax
push 0x6602cc
push ecx
call 0x811f36
add esp, 0xc
test eax, eax
je 0x6154df
mov eax, dword [ebx + 0x2f0]
push ebx
call eax
mov esi, eax
add esp, 4
cmp esi, 0xffffffff
jne 0x6153d6
mov byte [edi], 0
mov ecx, 0x660610
mov eax, dword [ebp + 8]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x61550a
test dl, dl
je 0x615506
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x61550a
add eax, 2
adc dword [ebx - 0x3346e8e7], 0x26
mov edi, 0xb379e229
push ds
mov bl, 0x1e
xchg dword [ecx - 0x46], edi
cmp byte [esi - 0x57], al
in eax, dx
jnp 0x615578
mov ecx, 0xd9032891
adc esi, dword [edx + 0x3031e427]
aam 0x1a
enter 0xffffffffffffa5b0, 0x48
adc byte [ecx], bh
invalid
inc esi
enter 0xffffffffffffc807, 0xffffffffffffff89
jmp 0xddf619d
mov sp, 0x3f31
and byte [edi], dh
dec esi
mov al, 0x2f
xor al, 0x2b
cmc
sbb byte [ebx - 0x44], 0x23
mov esp, 0xe3b6323c
sbb dword [edi - 0x1c1a5cb7], ebp
push ebx
dec ebp
mov dword [0x44fc654d], eax
dec ebp
push ebp
out dx, eax
inc ebp
and al, 0x47
push eax
sub al, 0xbb
xor esi, dword [esi]
sub cl, byte [ebx + eax*4 - 0x6cdc02c7]
sbb eax, 0x769bbae0
cmpsd dword [esi], dword es:[edi]
sub al, ch
mov ss, word [edi + 0x5a]
pop edx
dec ebx
stosb byte es:[edi], al
xchg ebp, eax
call 0x6f66e879
cmpsb byte [esi], byte es:[edi]
std
arpl word [edi + 0x4283a9f3], bp
sbb al, 0xe4
jecxz 0x615969
in al, 0xe3
rol dword [edi + 8], 0xf4
inc edi
or ah, dh
jmp 0x15b6eb5c
dec ecx
adc ebp, dword [ecx]
dec eax
int1
shr dword [edx - 0x501c1b7a], cl
invalid
push edi
retf 0x3163
push ebx
xchg ecx, eax
popf
and al, 0x8b
invalid