Function at 0x41857b
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, 0x100
cmp dword [ebp + 8], eax
jbe 0x418591
mov dword [ebp + 8], eax
push ebx
mov ebx, dword [ebp + 0xc]
xor eax, eax
inc eax
cmp dword [ebp + 8], eax
push esi
push edi
jae 0x4185ae
push 0x4284b0
push ebx
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
cmp dword [ebp + 8], 0
jbe 0x4185cd
mov ecx, dword [ebp + 8]
mov eax, ecx
shr ecx, 2
mov esi, ebx
lea edi, [ebp - 0x10c]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 2
push dword [ebp + 8]
call fcn.00420a13
test edx, edx
mov esi, dword [ebp + 0x20]
pop ecx
pop ecx
mov dword [ebp - 4], edx
mov dword [esi], eax
je 0x4185e8
inc eax
mov dword [esi], eax
mov edx, dword [ebp + 0x18]
xor eax, eax
mov ecx, 0x80
mov edi, edx
rep stosd dword es:[edi], eax
xor ecx, ecx
mov edi, dword [esi]
dec edi
cmp ecx, edi
jne 0x41860e
cmp dword [ebp - 4], 0
je 0x41860e
movzx edi, byte [eax + ebx]
shl edi, 8
jmp 0x418620
movzx edi, byte [eax + ebx]
movzx edx, byte [eax + ebx + 1]
shl edi, 8
add edi, edx
mov edx, dword [ebp + 0x18]
inc eax
mov dword [edx + ecx*4], edi
mov edi, dword [esi]
inc eax
inc ecx
dec edi
cmp ecx, edi
jbe 0x4185f8
mov eax, dword [ebp + 0x1c]
and dword [eax], 0
mov eax, dword [ebp + 0x14]
mov ebx, dword [ebp + 0x10]
mov dword [eax], 0x15a4e35
and dword [ebx], 0
xor edi, edi
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push ebx
push dword [ebp + 0x1c]
call fcn.004184a6
add esp, 0x10
inc edi
cmp edi, dword [ebx]
jbe 0x418643
inc dword [ebx]
mov eax, dword [esi]
dec eax
cmp dword [ebx], eax
jbe 0x418641
xor esi, esi
cmp dword [ebp + 8], esi
jbe 0x418695
push dword [ebp + 0x20]
xor eax, eax
push dword [ebp + 0x1c]
lea edi, [ebp + esi - 0x10c]
push dword [ebp + 0x18]
mov al, byte [edi]
push dword [ebp + 0x14]
push ebx
push eax
call fcn.004184e9
xor al, byte [edi]
add esp, 0x18
inc esi
cmp esi, dword [ebp + 8]
mov byte [edi], al
jb 0x41866a
mov eax, dword [ebp + 8]
lea eax, [eax + eax*4 + 5]
shl eax, 1
dec esi
cmp eax, 1
jb 0x4186d9
mov dword [ebp + 0x10], eax
push dword [ebp + 0x20]
xor eax, eax
push dword [ebp + 0x1c]
lea edi, [ebp + esi - 0x10c]
push dword [ebp + 0x18]
mov al, byte [edi]
push dword [ebp + 0x14]
push ebx
push eax
call fcn.004184e9
xor al, byte [edi]
add esp, 0x18
inc esi
cmp esi, dword [ebp + 8]
mov byte [edi], al
jb 0x4186d4
xor esi, esi
dec dword [ebp + 0x10]
jne 0x4186a7
push 2
push dword [ebp + 8]
call fcn.00420a13
test edx, edx
mov esi, dword [ebp + 0x20]
pop ecx
pop ecx
mov dword [ebp - 4], edx
mov dword [esi], eax
je 0x4186f4
inc eax
mov dword [esi], eax
mov edi, dword [ebp + 0x18]
xor eax, eax
mov ecx, 0x80
rep stosd dword es:[edi], eax
xor ecx, ecx
lea edx, [ebp - 0x10b]
lea eax, [ebp - 0x10c]
mov esi, dword [esi]
dec esi
cmp ecx, esi
jne 0x418723
cmp dword [ebp - 4], 0
je 0x418723
movzx esi, byte [eax]
shl esi, 8
jmp 0x418730
movzx esi, byte [eax]
movzx edi, byte [edx]
shl esi, 8
add esi, edi
inc eax
inc edx
mov edi, dword [ebp + 0x18]
mov dword [edi + ecx*4], esi
mov esi, dword [ebp + 0x20]
mov edi, dword [esi]
inc eax
inc edx
inc ecx
dec edi
cmp ecx, edi
jbe 0x41870e
mov ecx, dword [ebp + 8]
test ecx, ecx
jbe 0x41875d
mov edi, dword [ebp + 0xc]
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp + 0x1c]
and dword [eax], 0
mov eax, dword [ebp + 0x14]
mov dword [eax], 0x15a4e35
and dword [ebx], 0
xor edi, edi
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push ebx
push dword [ebp + 0x1c]
call fcn.004184a6
add esp, 0x10
inc edi
cmp edi, dword [ebx]
jbe 0x418771
inc dword [ebx]
mov eax, dword [esi]
dec eax
cmp dword [ebx], eax
jbe 0x41876f
pop edi
pop esi
pop ebx
leave
ret