Function at 0x1049238
Capabilities:
Encode data using xor

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x13912f4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x30], eax
xor eax, eax
push ebx
push esi
push edi
mov byte [ebp - 0x24], 0
lea edi, [ebp - 0x23]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
cmp dword [0x138a134], 1
mov byte [ebp - 0x14], 0
lea edi, [ebp - 0x13]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
je 0x1049284
mov esi, 0x8000ffff
jmp 0x1049402
mov ecx, 0x138a104
call fcn.0103f73f
mov esi, eax
test esi, esi
jl 0x1049402
cmp dword [ebp + 0x10], 0x10
je 0x10492a8
mov esi, 0x8007000d
jmp 0x1049402
and dword [ebp - 0x2c], 0
lea eax, [ebp - 0x28]
push eax
push 0x10
push dword [ebp + 8]
call fcn.01046e98
mov esi, eax
test esi, esi
jl 0x1049402
mov ebx, dword [ebp - 0x28]
test ebx, ebx
jbe 0x104932c
and dword [ebp - 0x28], 0
test ebx, ebx
jbe 0x104932c
xor edi, edi
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebp + 8]
jae 0x104943a
mov ecx, dword [ebp + 0xc]
mov cl, byte [eax + ecx]
xor cl, byte [ebp + edi - 0x24]
mov byte [ebp + edi - 0x14], cl
lea ecx, [ebp - 0x2c]
push ecx
push 1
push eax
call fcn.0103f13a
mov esi, eax
test esi, esi
jl 0x1049402
inc edi
cmp edi, 0x10
jb 0x10492d5
push 0x10
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.0117a260
mov esi, eax
test esi, esi
jl 0x1049402
inc dword [ebp - 0x28]
cmp dword [ebp - 0x28], ebx
jb 0x10492d3
xor esi, esi
test ebx, ebx
je 0x1049448
mov eax, ebx
shl eax, 4
mov ecx, eax
shr ecx, 4
cmp ecx, ebx
je 0x1049441
mov eax, 0x80070216
mov esi, eax
mov ecx, dword [0x136ec90]
cmp ecx, 0x136ec90
je 0x1049376
test byte [ecx + 0x3c], 2
je 0x1049376
push eax
push 0x10039dc
push 0xc
push dword [ecx + 0x34]
push dword [ecx + 0x30]
call fcn.0103e52d
test esi, esi
jl 0x1049402
lea eax, [ebp - 0x28]
push eax
push ebx
push dword [ebp + 8]
call fcn.0104458e
mov esi, eax
test esi, esi
jl 0x1049402
mov ebx, dword [ebp - 0x28]
cmp ebx, 0x10
jae 0x104943a
xor eax, eax
lea edi, [ebp - 0x14]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor edi, edi
test ebx, ebx
jbe 0x10493d9
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebp + 8]
jae 0x104943a
mov ecx, dword [ebp + 0xc]
mov cl, byte [eax + ecx]
mov byte [ebp + edi - 0x14], cl
lea ecx, [ebp - 0x2c]
push ecx
push 1
push eax
call fcn.0103f13a
mov esi, eax
test esi, esi
jl 0x1049402
inc edi
cmp edi, ebx
jb 0x10493ac
mov byte [ebp + ebx - 0x14], 0x80
xor eax, eax
mov cl, byte [ebp + eax - 0x24]
xor byte [ebp + eax - 0x14], cl
inc eax
cmp eax, 0x10
jb 0x10493e0
push 0x10
push dword [ebp - 0x30]
lea eax, [ebp - 0x14]
push eax
call fcn.0117a260
mov esi, eax
test esi, esi
jge 0x1049427
mov eax, dword [0x136ec90]
cmp eax, 0x136ec90
je 0x1049427
test byte [eax + 0x3c], 2
je 0x1049427
push esi
push 0x10039bc
push 0xa
push dword [eax + 0x34]
push dword [eax + 0x30]
call fcn.0103e52d
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.0103e3fb
leave
ret 0x10
mov esi, 0x80004005
jmp 0x1049402
mov ebx, eax
jmp 0x1049376
xor ebx, ebx
xor esi, esi
jmp 0x1049376