Function at 0x10054911
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
mov ebx, dword [ebp + 0x10]
neg ebx
sbb ebx, ebx
push esi
mov esi, dword [ebp + 8]
mov eax, 0x2000000
and ebx, eax
push edi
push dword [ebp + 0x14]
add ebx, eax
mov eax, dword [ebp + 0x14]
xor eax, 0xa
push esi
mov dword [ebp - 0x10], eax
call fcn.10012c4c
and dword [ebp - 0x40], 0
pop ecx
mov dword [ebp - 0xc], eax
mov dword [ebp + 0x10], eax
pop ecx
lea ecx, [esi + eax*2]
xor eax, eax
lea edi, [ebp - 0x3c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ebp + 8], ecx
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x14], esi
stosd dword es:[edi], eax
call fcn.10050060
cmp dword [ebp + 0x14], 0
mov edi, 0x400
jne 0x1005497b
mov esi, dword [ebp + 8]
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp + 0x10]
jmp 0x1005499b
cmp esi, dword [ebp + 8]
jae 0x100549b7
mov ecx, esi
mov ax, word [esi]
inc esi
inc esi
cmp word [ebp - 0x10], ax
je 0x10054992
cmp esi, dword [ebp + 8]
jb 0x10054982
mov eax, esi
sub eax, ecx
sar eax, 1
mov dword [ebp + 0x10], eax
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x40]
mov dword [ebp - 0x3c], ecx
push eax
lea ecx, [ebp - 0x2c]
call fcn.1005007a
cmp edi, dword [ebp + 0x10]
jge 0x1005497b
mov edi, dword [ebp + 0x10]
jmp 0x1005497b
mov eax, dword [ebp - 0xc]
lea eax, [edi + eax + 0x1a]
push eax
lea ecx, [ebp + 0x10]
call fcn.10046141
mov eax, dword [ebp + 0x10]
and dword [ebp - 0xc], 0
and dword [ebp - 4], 0
lea eax, [eax + edi*2 + 0x14]
mov edi, dword [ebp - 0x24]
test edi, edi
mov dword [ebp - 0x18], eax
jle 0x10054aff
mov eax, edi
cdq
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
call fcn.1004211f
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push edx
push eax
call fcn.100b69d0
cmp eax, edi
jge 0x10054af3
mov esi, dword [ebp - 0x2c]
lea ecx, [eax + eax*4]
lea ecx, [esi + ecx*4]
cmp dword [ecx], 0
je 0x10054a22
inc eax
add ecx, 0x14
cmp eax, edi
jl 0x10054a10
jmp 0x10054af3
inc dword [ebp - 0xc]
lea eax, [eax + eax*4]
lea esi, [esi + eax*4]
mov edi, dword [esi + 8]
lea eax, [edi + edi]
push eax
push dword [esi + 4]
mov dword [esi], 1
push dword [ebp + 0x10]
call fcn.100144ff
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 4]
lea edx, [eax + ecx*2]
mov ecx, dword [ebp + 0x10]
lea eax, [ecx + edi*2]
add esp, 0xc
cmp ecx, eax
mov dword [ebp - 0x14], edx
mov dword [ebp - 8], edx
mov dword [ebp + 8], ecx
mov dword [ebp - 0x10], edi
jae 0x10054a8e
mov dx, word [ebp + 0x14]
xor word [ecx], dx
inc ecx
inc ecx
cmp ecx, eax
jb 0x10054a65
mov edx, dword [ebp - 8]
mov ecx, dword [ebp + 8]
cmp byte [ecx], 0x7f
ja 0x10054a8e
mov cx, word [ecx]
add dword [ebp + 8], 2
mov word [edx], cx
inc edx
inc edx
cmp dword [ebp + 8], eax
jb 0x10054a75
mov eax, edx
sub eax, dword [ebp - 0x14]
sar eax, 1
sub edi, eax
test edi, edi
mov dword [ebp - 8], eax
jle 0x10054abd
mov eax, dword [ebp - 0x10]
add eax, edi
push eax
push edx
push edi
push dword [ebp + 8]
mov eax, 0x20804
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_LCMapStringW]
test eax, eax
jle 0x10054abd
add dword [ebp - 8], eax
mov eax, dword [ebp - 0x10]
add eax, eax
push eax
push 0
push dword [ebp + 0x10]
call fcn.100b40f0
mov eax, dword [ebp - 8]
add dword [ebp - 4], eax
mov ecx, dword [ebp - 0x14]
add esp, 0xc
test eax, eax
mov dword [esi + 0xc], ecx
mov dword [esi + 0x10], eax
jle 0x10054af3
dec eax
js 0x10054af3
inc eax
mov dx, word [ebp + 0x14]
xor word [ecx], dx
inc ecx
inc ecx
dec eax
jne 0x10054ae7
mov edi, dword [ebp - 0x24]
cmp dword [ebp - 0xc], edi
jl 0x100549ed
mov eax, dword [ebp - 4]
mov ebx, dword [ebp + 0xc]
add eax, 0x11
push eax
mov ecx, ebx
call fcn.1000f775
test edi, edi
mov esi, dword [ebx]
jle 0x10054b40
mov edi, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x24]
add edi, 0x10
mov dword [ebp + 8], eax
mov eax, dword [edi]
shl eax, 1
push eax
push dword [edi - 4]
push esi
call fcn.100144ff
mov eax, dword [edi]
add esp, 0xc
add edi, 0x14
dec dword [ebp + 8]
lea esi, [esi + eax*2]
jne 0x10054b22
mov ax, word [ebp + 0x14]
push dword [ebp + 0x10]
mov word [esi], ax
call fcn.1003f93e
mov ebx, dword [ebx]
pop ecx
lea ecx, [ebp + 0x10]
call fcn.1003f96c
lea eax, [ebp - 0x2c]
push eax
call fcn.1003f9f9
pop ecx
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret