Function at 0x49ead0
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 0x49ed3d
jb 0x49eb14
cmp ecx, 0xffffffe0
ja 0x49ed3d
mov dword [esi + 0x3c], eax
mov dword [esi + 0x38], ecx
mov ecx, dword [esi + 0x168]
xor eax, eax
mov dword [ebp - 4], ecx
cmp dword [esi + 0x16c], eax
je 0x49eb96
cmp edx, eax
jne 0x49eb56
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 ecx, dword [esi + 0x40]
mov dword [esi + 0x178], ecx
mov ecx, dword [esi + 0x44]
mov dword [esi + 0x17c], ecx
mov ecx, dword [esi + 0x48]
mov dword [esi + 0x180], ecx
mov ecx, dword [esi + 0x4c]
mov dword [ebp - 4], 0x10
mov dword [esi + 0x184], ecx
mov ecx, dword [ebp - 4]
mov dword [esi + 0x40], eax
mov dword [esi + 0x44], eax
mov dword [esi + 0x48], eax
mov dword [esi + 0x4c], eax
mov dword [esi + 0x16c], eax
mov ebx, dword [esi + 0xc]
mov eax, ecx
and eax, 0xf
bswap ebx
mov dword [ebp - 0xc], eax
je 0x49ec06
jmp 0x49ebaa
mov eax, dword [ebp - 0xc]
test edx, edx
je 0x49ebdb
mov al, byte [eax + esi + 0x10]
mov edx, dword [ebp + 8]
xor al, byte [edx]
inc edx
mov byte [edi], al
mov byte [ecx + esi + 0x178], al
mov eax, dword [ebp - 0xc]
mov dword [ebp + 8], edx
mov edx, dword [ebp + 0xc]
dec edx
inc eax
inc ecx
inc edi
and eax, 0xf
mov dword [ebp + 0xc], edx
mov dword [ebp - 0xc], eax
jne 0x49eba7
jmp 0x49ebe3
test eax, eax
jne 0x49ed2f
push ecx
lea ecx, [esi + 0x178]
push ecx
lea edx, [esi + 0x60]
push edx
lea eax, [esi + 0x40]
push eax
call dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 4]
add esp, 0x10
cmp edx, 0x10
jb 0x49ec32
test ecx, ecx
je 0x49ec32
push ecx
lea ecx, [esi + 0x178]
push ecx
lea edx, [esi + 0x60]
push edx
lea eax, [esi + 0x40]
push eax
call dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 4]
add esp, 0x10
cmp edx, 0xc00
jb 0x49ec92
mov eax, 0xaaaaaaab
mul edx
shr edx, 0xb
mov dword [ebp - 0x14], edx
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + 8]
push esi
push ecx
push 0xc0
push edi
push edx
call dword [ebp + 0x10]
add ebx, 0xc0
mov eax, ebx
bswap eax
push 0xc00
mov dword [esi + 0xc], eax
push edi
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call dword [ebp - 8]
mov eax, 0xc00
add dword [ebp + 8], eax
sub dword [ebp + 0xc], eax
add esp, 0x24
add edi, eax
dec dword [ebp - 0x14]
jne 0x49ec47
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0xc]
mov eax, edx
and eax, 0xfffffff0
mov dword [ebp - 0x14], eax
je 0x49ecdc
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + 8]
push esi
push ecx
shr eax, 4
push eax
push edi
push edx
mov dword [ebp - 0x18], eax
call dword [ebp + 0x10]
add ebx, dword [ebp - 0x18]
lea ecx, [esi + 0x60]
mov eax, ebx
bswap eax
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x14]
add dword [ebp + 8], eax
sub dword [ebp + 0xc], eax
push eax
push edi
push ecx
lea edx, [esi + 0x40]
push edx
call dword [ebp - 8]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0xc]
add esp, 0x24
add edi, dword [ebp - 0x14]
test edx, edx
je 0x49ed2f
mov eax, dword [ebp - 0x10]
mov edx, dword [esi + 0x170]
push eax
lea ecx, [esi + 0x10]
push ecx
push esi
call edx
mov edx, dword [ebp - 0xc]
inc ebx
bswap ebx
mov dword [esi + 0xc], ebx
mov ebx, dword [ebp + 8]
add esp, 0xc
lea ecx, [edx + edi]
lea edx, [edx + esi + 0x10]
sub ebx, edi
movzx edi, byte [edx]
movzx eax, byte [ebx + ecx]
dec dword [ebp + 0xc]
xor eax, edi
mov edi, dword [ebp - 4]
mov byte [ecx], al
mov byte [esi + edi + 0x178], al
inc edi
inc edx
inc ecx
cmp dword [ebp + 0xc], 0
mov dword [ebp - 4], edi
jne 0x49ed09
mov ecx, edi
mov dword [esi + 0x168], ecx
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