Function at 0x415810
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x1c
mov eax, dword [esp + 0x24]
push ebx
push ebp
mov ebp, 1
lea ebx, [eax + 0xa]
push esi
and ebx, 0x80000007
push edi
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], 0
jns 0x41583c
dec ebx
or ebx, 0xfffffff8
inc ebx
je 0x415847
mov ecx, 8
sub ecx, ebx
mov ebx, ecx
mov edi, dword [sym.imp.MSVCRT.dll_rand]
call edi
and al, 0xf8
mov esi, ebx
or al, bl
inc ebx
mov byte [esp + 0x1c], al
call edi
and eax, 0xff
mov ecx, esi
mov dl, al
lea edi, [esp + 0x1d]
mov dh, dl
mov eax, edx
shl eax, 0x10
mov ax, dx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
xor eax, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x3c]
mov edi, eax
mov esi, eax
neg eax
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x18], eax
mov ebp, eax
cmp ebx, 8
jge 0x4158b9
call dword [sym.imp.MSVCRT.dll_rand]
mov byte [esp + ebx + 0x1c], al
mov eax, dword [esp + 0x3c]
inc ebx
inc eax
mov dword [esp + 0x3c], eax
cmp ebx, 8
jne 0x415943
lea edx, [esp + 0x1c]
xor ebx, ebx
xor ecx, ecx
lea ebp, [esp + ebp + 0x24]
sub edi, edx
mov eax, dword [esp + 0x14]
cmp eax, ebx
lea eax, [esp + ecx + 0x1c]
je 0x4158e1
lea edx, [edi + ebp]
mov dl, byte [edx + eax]
jmp 0x4158e4
mov dl, byte [edi + eax]
xor byte [eax], dl
inc ecx
cmp ecx, 8
jl 0x4158cd
mov eax, dword [esp + 0x38]
push esi
lea ecx, [esp + 0x20]
push eax
push ecx
call fcn.00415640
mov ecx, dword [esp + 0x24]
add esp, 0xc
mov eax, esi
mov edi, 8
lea ebp, [esp + ecx + 0x24]
mov dl, byte [eax + ebp]
xor byte [eax], dl
inc eax
dec edi
jne 0x41590e
mov edx, dword [esp + 0x1c]
mov edi, esi
mov esi, eax
mov eax, dword [esp + 0x10]
mov ebp, ecx
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x20]
sub ecx, 8
add eax, 8
mov dword [esp + 0x28], edx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ebx
cmp dword [esp + 0x3c], 2
jle 0x41589d
mov eax, dword [esp + 0x30]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x34]
test eax, eax
jle 0x415a1d
mov ebp, esi
mov edx, edi
neg ebp
neg edx
cmp ebx, 8
jge 0x41598b
mov eax, dword [esp + 0x3c]
inc ebx
mov cl, byte [eax]
inc eax
mov byte [esp + ebx + 0x1b], cl
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x34]
dec eax
cmp ebx, 8
mov dword [esp + 0x34], eax
jne 0x415a11
lea eax, [esp + 0x1c]
xor ecx, ecx
lea edx, [esp + edx + 0x24]
sub edi, eax
mov eax, dword [esp + 0x14]
test eax, eax
lea eax, [esp + ecx + 0x1c]
je 0x4159b1
lea ebx, [edi + edx]
mov bl, byte [ebx + eax]
jmp 0x4159b4
mov bl, byte [edi + eax]
xor byte [eax], bl
inc ecx
cmp ecx, 8
jl 0x41599d
mov ecx, dword [esp + 0x38]
push esi
lea edx, [esp + 0x20]
push ecx
push edx
call fcn.00415640
add esp, 0xc
mov eax, esi
lea edi, [esp + ebp + 0x24]
mov ecx, 8
mov dl, byte [eax + edi]
mov bl, byte [eax]
xor bl, dl
mov byte [eax], bl
inc eax
dec ecx
jne 0x4159da
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov edi, esi
mov esi, eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x28], edx
mov edx, ebp
sub ebp, 8
add eax, 8
xor ebx, ebx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ebx
mov eax, dword [esp + 0x34]
test eax, eax
jg 0x41596a
mov ebp, esi
mov edx, edi
neg ebp
mov dword [esp + 0x3c], 1
neg edx
cmp ebx, 8
jge 0x415a44
mov eax, dword [esp + 0x3c]
mov byte [esp + ebx + 0x1c], 0
inc ebx
inc eax
mov dword [esp + 0x3c], eax
cmp ebx, 8
jne 0x415aca
lea eax, [esp + 0x1c]
xor ecx, ecx
lea edx, [esp + edx + 0x24]
sub edi, eax
mov eax, dword [esp + 0x14]
test eax, eax
lea eax, [esp + ecx + 0x1c]
je 0x415a6a
lea ebx, [edi + edx]
mov bl, byte [ebx + eax]
jmp 0x415a6d
mov bl, byte [edi + eax]
xor byte [eax], bl
inc ecx
cmp ecx, 8
jl 0x415a56
mov ecx, dword [esp + 0x38]
push esi
lea edx, [esp + 0x20]
push ecx
push edx
call fcn.00415640
add esp, 0xc
mov eax, esi
lea edi, [esp + ebp + 0x24]
mov ecx, 8
mov dl, byte [eax + edi]
mov bl, byte [eax]
xor bl, dl
mov byte [eax], bl
inc eax
dec ecx
jne 0x415a93
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov edi, esi
mov esi, eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x28], edx
mov edx, ebp
sub ebp, 8
add eax, 8
xor ebx, ebx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ebx
cmp dword [esp + 0x3c], 7
jle 0x415a2d
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x10]
pop edi
pop esi
pop ebp
mov dword [eax], ecx
pop ebx
add esp, 0x1c
ret