Function at 0x1004d380
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push dword [ebp + 0xc]
mov ecx, dword [ebx + 0x1cdd8]
lea esi, [ebx + 0x2b6a]
call fcn.10009190
mov dword [ebp - 0xc], eax
test eax, eax
jle 0x1004d60a
cmp eax, dword [ebx + 0x56]
jae 0x1004d60a
push 0x10
lea ecx, [ebx + 0x2a9a]
push ecx
push eax
mov ecx, ebx
call fcn.10004380
xor edx, edx
mov ecx, 0xffff
mov dword [ebp - 8], edx
mov ebx, 0x100
inc ecx
mov dword [ebp - 4], ecx
cmp cx, bx
jb 0x1004d3f4
test edx, edx
jne 0x1004d60a
mov ecx, 1
mov dword [ebp - 8], 1
mov dword [ebp - 4], ecx
xor al, al
mov bl, cl
mov edx, esi
mov edi, 0x10
nop
mov cl, byte [edx - 0xd0]
lea edx, [edx + 1]
xor cl, bl
add bl, al
mov byte [edx - 1], cl
sub edi, 1
jne 0x1004d400
mov ebx, dword [ebp + 0x10]
mov edx, 4
nop dword [eax]
mov ecx, dword [edx + esi]
and ecx, 0xffffff00
cmp ecx, ebx
je 0x1004d5db
inc edx
cmp edx, 0xc
jb 0x1004d420
mov ecx, dword [ebp - 4]
inc al
cmp al, 0xff
jne 0x1004d3f6
xor al, al
mov bl, byte [ebp - 4]
mov edx, esi
mov edi, 0x10
nop dword [eax]
mov cl, byte [edx - 0xd0]
lea edx, [edx + 1]
sub cl, bl
add bl, al
mov byte [edx - 1], cl
sub edi, 1
jne 0x1004d450
mov ebx, dword [ebp + 0x10]
mov edx, 4
nop dword [eax]
mov ecx, dword [edx + esi]
and ecx, 0xffffff00
cmp ecx, ebx
je 0x1004d5d7
inc edx
cmp edx, 0xc
jb 0x1004d470
inc al
cmp al, 0xff
jne 0x1004d442
xor al, al
nop
mov bl, byte [ebp - 4]
mov edx, esi
mov edi, 0x10
nop word [eax + eax]
mov cl, byte [edx - 0xd0]
lea edx, [edx + 1]
add cl, bl
add bl, al
mov byte [edx - 1], cl
sub edi, 1
jne 0x1004d4a0
mov ebx, dword [ebp + 0x10]
mov edx, 4
nop dword [eax]
mov ecx, dword [edx + esi]
and ecx, 0xffffff00
cmp ecx, ebx
je 0x1004d5d3
inc edx
cmp edx, 0xc
jb 0x1004d4c0
inc al
cmp al, 0xff
jne 0x1004d490
or al, al
nop
mov bl, byte [ebp - 4]
mov edx, esi
mov edi, 0x10
nop word [eax + eax]
mov cl, byte [edx - 0xd0]
lea edx, [edx + 1]
xor cl, bl
add bl, al
mov byte [edx - 1], cl
sub edi, 1
jne 0x1004d4f0
mov ebx, dword [ebp + 0x10]
mov edx, 4
nop dword [eax]
mov ecx, dword [edx + esi]
and ecx, 0xffffff00
cmp ecx, ebx
je 0x1004d5db
inc edx
cmp edx, 0xc
jb 0x1004d510
add al, 0xff
jne 0x1004d4e0
or al, 0xff
nop dword [eax]
mov bl, byte [ebp - 4]
mov edx, esi
mov edi, 0x10
nop word [eax + eax]
mov cl, byte [edx - 0xd0]
lea edx, [edx + 1]
sub cl, bl
add bl, al
mov byte [edx - 1], cl
sub edi, 1
jne 0x1004d540
mov ebx, dword [ebp + 0x10]
mov edx, 4
nop dword [eax]
mov ecx, dword [edx + esi]
and ecx, 0xffffff00
cmp ecx, ebx
je 0x1004d5d7
inc edx
cmp edx, 0xc
jb 0x1004d560
add al, 0xff
jne 0x1004d530
or al, 0xff
nop dword [eax]
mov bl, byte [ebp - 4]
mov edx, esi
mov edi, 0x10
nop word [eax + eax]
mov cl, byte [edx - 0xd0]
lea edx, [edx + 1]
add cl, bl
add bl, al
mov byte [edx - 1], cl
sub edi, 1
jne 0x1004d590
mov ebx, dword [ebp + 0x10]
mov edx, 4
nop dword [eax]
mov ecx, dword [edx + esi]
and ecx, 0xffffff00
cmp ecx, ebx
je 0x1004d5d3
inc edx
cmp edx, 0xc
jb 0x1004d5b0
add al, 0xff
jne 0x1004d580
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
inc ecx
jmp 0x1004d3cf
mov cl, 3
jmp 0x1004d5dd
mov cl, 2
jmp 0x1004d5dd
mov cl, 1
mov edx, dword [ebp + 8]
mov esi, dword [ebp - 0xc]
pop edi
mov dword [edx + 0x2a7a], esi
mov byte [edx + 0x2a82], cl
mov ecx, dword [ebp - 4]
pop esi
mov byte [edx + 0x2a84], al
mov eax, 1
mov byte [edx + 0x2a83], cl
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret