Function at 0x49ed50
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x18
call fcn.00596bf0
mov eax, dword [esi + 0x174]
mov edx, dword [ebp + 0xc]
push ebx
push edi
mov edi, ecx
mov ecx, dword [esi + 0x164]
mov dword [ebp - 8], ecx
mov dword [ebp - 0x10], eax
xor eax, eax
mov ecx, edx
add ecx, dword [esi + 0x38]
adc eax, dword [esi + 0x3c]
cmp eax, 0xf
ja 0x49efc0
jb 0x49ed94
cmp ecx, 0xffffffe0
ja 0x49efc0
mov dword [esi + 0x38], ecx
mov dword [esi + 0x3c], eax
mov eax, dword [esi + 0x168]
xor ecx, ecx
mov dword [ebp - 4], eax
cmp dword [esi + 0x16c], ecx
je 0x49ee16
cmp edx, ecx
jne 0x49edd6
mov ecx, dword [esi + 0x160]
lea edx, [esi + 0x60]
push edx
lea eax, [esi + 0x40]
push eax
call ecx
add esp, 8
mov dword [esi + 0x16c], 0
xor eax, eax
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 0x40]
mov eax, dword [esi + 0x44]
mov dword [esi + 0x178], edx
mov edx, dword [esi + 0x48]
mov dword [esi + 0x17c], eax
mov eax, dword [esi + 0x4c]
mov dword [esi + 0x180], edx
mov dword [ebp - 4], 0x10
mov dword [esi + 0x184], eax
mov eax, dword [ebp - 4]
mov dword [esi + 0x40], ecx
mov dword [esi + 0x44], ecx
mov dword [esi + 0x48], ecx
mov dword [esi + 0x4c], ecx
mov dword [esi + 0x16c], ecx
mov ebx, dword [esi + 0xc]
mov edx, eax
and edx, 0xf
bswap ebx
mov dword [ebp - 0xc], edx
je 0x49ee85
jmp 0x49ee2a
mov edx, dword [ebp - 0xc]
cmp dword [ebp + 0xc], 0
je 0x49ee5b
mov cl, byte [edi]
dec dword [ebp + 0xc]
mov byte [eax + esi + 0x178], cl
mov dl, byte [edx + esi + 0x10]
xor dl, cl
mov ecx, dword [ebp + 8]
mov byte [ecx], dl
inc ecx
mov dword [ebp + 8], ecx
mov ecx, dword [ebp - 0xc]
inc ecx
inc eax
inc edi
and ecx, 0xf
mov dword [ebp - 0xc], ecx
jne 0x49ee27
jmp 0x49ee63
test edx, edx
jne 0x49efb2
push eax
lea edx, [esi + 0x178]
push edx
lea eax, [esi + 0x60]
push eax
lea ecx, [esi + 0x40]
push ecx
call dword [ebp - 8]
mov dword [ebp - 4], 0
mov eax, dword [ebp - 4]
add esp, 0x10
xor ecx, ecx
mov edx, dword [ebp + 0xc]
cmp edx, 0x10
jb 0x49eeb4
cmp eax, ecx
je 0x49eeb4
push eax
lea edx, [esi + 0x178]
push edx
lea eax, [esi + 0x60]
push eax
lea ecx, [esi + 0x40]
push ecx
call dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov dword [ebp - 4], 0
mov eax, dword [ebp - 4]
add esp, 0x10
cmp edx, 0xc00
jb 0x49ef14
mov eax, 0xaaaaaaab
mul edx
shr edx, 0xb
mov dword [ebp - 0x14], edx
push 0xc00
push edi
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call dword [ebp - 8]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
push esi
push edx
push 0xc0
push eax
push edi
call dword [ebp + 0x10]
add ebx, 0xc0
mov eax, 0xc00
add dword [ebp + 8], eax
sub dword [ebp + 0xc], eax
mov ecx, ebx
add esp, 0x24
bswap ecx
add edi, eax
dec dword [ebp - 0x14]
mov dword [esi + 0xc], ecx
jne 0x49eec9
mov eax, dword [ebp - 4]
mov edx, dword [ebp + 0xc]
mov ecx, edx
and ecx, 0xfffffff0
mov dword [ebp - 0x18], ecx
je 0x49ef5f
push ecx
mov eax, ecx
shr eax, 4
push edi
lea edx, [esi + 0x60]
mov dword [ebp - 0x14], eax
push edx
lea eax, [esi + 0x40]
push eax
call dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp + 8]
push esi
push ecx
push edx
push eax
push edi
call dword [ebp + 0x10]
add ebx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
add dword [ebp + 8], eax
mov ecx, ebx
add edi, eax
add esp, 0x24
sub dword [ebp + 0xc], eax
mov eax, dword [ebp - 4]
bswap ecx
mov dword [esi + 0xc], ecx
cmp dword [ebp + 0xc], 0
je 0x49efb2
mov edx, dword [ebp - 0x10]
mov ecx, dword [esi + 0x170]
push edx
lea eax, [esi + 0x10]
push eax
push esi
call ecx
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp + 8]
inc ebx
bswap ebx
add esp, 0xc
lea eax, [edx + ecx]
mov dword [esi + 0xc], ebx
lea edx, [edx + esi + 0x10]
sub edi, ecx
mov cl, byte [edi + eax]
mov ebx, dword [ebp - 4]
dec dword [ebp + 0xc]
inc dword [ebp - 4]
mov byte [esi + ebx + 0x178], cl
mov bl, byte [edx]
xor bl, cl
mov byte [eax], bl
inc edx
inc eax
cmp dword [ebp + 0xc], 0
jne 0x49ef8e
mov eax, dword [ebp - 4]
mov dword [esi + 0x168], eax
xor eax, eax
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret