Function at 0x1058010
Capabilities:
Encode data using xor

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push edi
mov edi, dword [ebp + 0x18]
mov eax, dword [edi + 8]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x14]
xor ebx, ebx
lea eax, [eax + eax + 0xc]
mov dword [ebp - 4], ebx
test eax, eax
je 0x10582a2
push esi
inc eax
push eax
push 8
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.DLL_HeapAlloc]
mov esi, eax
test esi, esi
je 0x10582a1
mov dword [ebp - 0xc], ebx
cmp dword [ebp + 0x14], ebx
jbe 0x1058291
jmp 0x1058067
mov edi, dword [ebp + 0x18]
mov ebx, dword [ebp - 4]
cmp dword [ebp - 0xc], 6
jge 0x1058291
mov ecx, dword [ebp + 0x10]
movzx eax, word [ecx + ebx*2]
test ax, ax
je 0x10580a8
lea ecx, [ecx]
cmp ax, 0xd
je 0x1058095
cmp ax, 0xa
je 0x1058095
cmp ax, 0x20
jne 0x10580a5
inc ebx
jmp 0x105809c
mov edx, dword [ebp + 0x20]
inc ebx
add dword [edi + 4], edx
movzx eax, word [ecx + ebx*2]
test ax, ax
jne 0x1058080
mov dword [ebp - 4], ebx
lea eax, [ecx + ebx*2]
test eax, eax
je 0x10580c0
mov ecx, dword [ebp + 0x14]
sub ecx, ebx
push ecx
push eax
push esi
call dword [sym.imp.msvcrt.dll_wcsncpy]
add esp, 0xc
mov al, byte [ebp + 0x24]
mov dword [ebp - 8], 0
test al, 2
je 0x10580d5
mov dword [ebp - 8], 1
test al, 0x40
je 0x10580dd
or dword [ebp - 8], 2
mov edi, dword [ebp + 0x14]
mov eax, dword [ebp + 8]
sub edi, ebx
xor ebx, ebx
test eax, eax
je 0x105811c
cmp dword [eax + 0x18], ebx
je 0x105811c
lea ecx, [esi + edi*2 - 2]
mov ebx, 1
mov eax, esi
cmp esi, ecx
jae 0x105811c
nop
mov dx, word [ecx]
xor word [eax], dx
movzx edx, word [eax]
xor word [ecx], dx
movzx edx, word [ecx]
xor word [eax], dx
add eax, 2
sub ecx, 2
cmp eax, ecx
jb 0x1058100
mov eax, dword [ebp - 8]
or eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0xc]
or eax, 0x50420
push eax
push ecx
push edi
push esi
push edx
call dword [sym.imp.USER32.dll_DrawTextW]
test ebx, ebx
je 0x1058162
lea ecx, [esi + edi*2 - 2]
mov eax, esi
cmp esi, ecx
jae 0x1058162
mov dx, word [ecx]
xor word [eax], dx
movzx edx, word [eax]
xor word [ecx], dx
movzx edx, word [ecx]
xor word [eax], dx
add eax, 2
sub ecx, 2
cmp eax, ecx
jb 0x1058146
push esi
xor edx, edx
xor edi, edi
call fcn.0102a730
xor ebx, ebx
test dword [ebp + 0x24], 0x800
jne 0x1058188
cmp word [esi + eax*2 - 6], 0x2e
jne 0x1058188
xor ecx, ecx
mov word [esi + eax*2], cx
lea ebx, [edx + 1]
cmp word [esi], 0
je 0x10581c6
mov eax, esi
movzx ecx, word [eax]
cmp cx, 0xd
je 0x10581a9
cmp cx, 0xa
je 0x10581a9
cmp cx, 0x20
jne 0x10581ae
mov edi, eax
jmp 0x10581ae
xor ecx, ecx
mov word [eax], cx
inc edx
cmp word [esi + edx*2], 0
lea eax, [esi + edx*2]
jne 0x1058190
test edi, edi
je 0x10581c6
test ebx, ebx
je 0x10581c6
xor edx, edx
mov word [edi], dx
push esi
call fcn.0102a730
mov ebx, dword [ebp - 8]
mov edi, eax
add dword [ebp - 4], edi
test bl, 3
je 0x10581e2
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 0x18]
mov dword [ecx + 8], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 8], 0
test eax, eax
je 0x1058223
cmp dword [eax + 0x18], 0
je 0x1058223
lea ecx, [esi + edi*2 - 2]
mov dword [ebp - 8], 1
mov eax, esi
cmp esi, ecx
jae 0x1058223
mov dx, word [ecx]
xor word [eax], dx
movzx edx, word [eax]
xor word [ecx], dx
movzx edx, word [ecx]
xor word [eax], dx
add eax, 2
sub ecx, 2
cmp eax, ecx
jb 0x1058207
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0xc]
or ebx, 0x20
push ebx
push eax
push edi
push esi
push ecx
call dword [sym.imp.USER32.dll_DrawTextW]
cmp dword [ebp - 8], 0
je 0x1058263
lea edx, [esi + edi*2 - 2]
mov ecx, esi
cmp esi, edx
jae 0x1058263
mov di, word [edx]
xor word [ecx], di
movzx edi, word [ecx]
xor word [edx], di
movzx edi, word [edx]
xor word [ecx], di
add ecx, 2
sub edx, 2
cmp ecx, edx
jb 0x1058247
mov edx, dword [ebp + 0x20]
inc dword [ebp - 0xc]
lea ecx, [eax + edx]
mov eax, dword [ebp + 0x18]
add dword [eax + 4], ecx
mov eax, dword [ebp + 0x14]
lea eax, [eax + eax + 0xc]
push eax
push 0
push esi
call sub.msvcrt.dll_memset
mov edx, dword [ebp - 4]
add esp, 0xc
cmp edx, dword [ebp + 0x14]
jb 0x1058061
push esi
push 0
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.DLL_HeapFree]
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x20