Function at 0x1059540
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 0x10597d2
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 0x10597d1
mov dword [ebp - 0xc], ebx
cmp dword [ebp + 0x14], ebx
jbe 0x10597c1
jmp 0x1059597
mov edi, dword [ebp + 0x18]
mov ebx, dword [ebp - 4]
cmp dword [ebp - 0xc], 6
jge 0x10597c1
mov ecx, dword [ebp + 0x10]
movzx eax, word [ecx + ebx*2]
test ax, ax
je 0x10595d8
lea ecx, [ecx]
cmp ax, 0xd
je 0x10595c5
cmp ax, 0xa
je 0x10595c5
cmp ax, 0x20
jne 0x10595d5
inc ebx
jmp 0x10595cc
mov edx, dword [ebp + 0x20]
inc ebx
add dword [edi + 4], edx
movzx eax, word [ecx + ebx*2]
test ax, ax
jne 0x10595b0
mov dword [ebp - 4], ebx
lea eax, [ecx + ebx*2]
test eax, eax
je 0x10595f0
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 0x1059605
mov dword [ebp - 8], 1
test al, 0x40
je 0x105960d
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 0x105964c
cmp dword [eax + 0x18], ebx
je 0x105964c
lea ecx, [esi + edi*2 - 2]
mov ebx, 1
mov eax, esi
cmp esi, ecx
jae 0x105964c
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 0x1059630
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 0x1059692
lea ecx, [esi + edi*2 - 2]
mov eax, esi
cmp esi, ecx
jae 0x1059692
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 0x1059676
push esi
xor edx, edx
xor edi, edi
call fcn.0102bd10
xor ebx, ebx
test dword [ebp + 0x24], 0x800
jne 0x10596b8
cmp word [esi + eax*2 - 6], 0x2e
jne 0x10596b8
xor ecx, ecx
mov word [esi + eax*2], cx
lea ebx, [edx + 1]
cmp word [esi], 0
je 0x10596f6
mov eax, esi
movzx ecx, word [eax]
cmp cx, 0xd
je 0x10596d9
cmp cx, 0xa
je 0x10596d9
cmp cx, 0x20
jne 0x10596de
mov edi, eax
jmp 0x10596de
xor ecx, ecx
mov word [eax], cx
inc edx
cmp word [esi + edx*2], 0
lea eax, [esi + edx*2]
jne 0x10596c0
test edi, edi
je 0x10596f6
test ebx, ebx
je 0x10596f6
xor edx, edx
mov word [edi], dx
push esi
call fcn.0102bd10
mov ebx, dword [ebp - 8]
mov edi, eax
add dword [ebp - 4], edi
test bl, 3
je 0x1059712
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 0x1059753
cmp dword [eax + 0x18], 0
je 0x1059753
lea ecx, [esi + edi*2 - 2]
mov dword [ebp - 8], 1
mov eax, esi
cmp esi, ecx
jae 0x1059753
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 0x1059737
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 0x1059793
lea edx, [esi + edi*2 - 2]
mov ecx, esi
cmp esi, edx
jae 0x1059793
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 0x1059777
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 0x1059591
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