Function at 0x4c1800
Capabilities:
Encode data using xor

Disassembly:
sub esp, 8
push edi
mov edi, dword [esp + 0x10]
mov dword [esp + 4], 0
test edi, edi
jne 0x4c181c
lea eax, [edi - 0x66]
pop edi
add esp, 8
ret
push ebx
mov ebx, dword [edi + 0x9c]
test ebx, ebx
jne 0x4c1830
lea eax, [ebx - 0x66]
pop ebx
pop edi
add esp, 8
ret
cmp dword [ebx], 0
jne 0x4c1840
pop ebx
mov eax, 0xffffff9c
pop edi
add esp, 8
ret
mov eax, dword [esp + 0x18]
mov dword [ebx + 0x10], eax
mov eax, dword [ebx + 0x5c]
mov dword [ebx + 0x14], ecx
cmp ecx, eax
jbe 0x4c185d
cmp dword [ebx + 0x8c], 0
jne 0x4c185d
mov dword [ebx + 0x14], eax
mov eax, dword [ebx + 8]
add eax, dword [ebx + 0x58]
cmp ecx, eax
jbe 0x4c1873
cmp dword [ebx + 0x8c], 0
je 0x4c1873
mov dword [ebx + 0x14], eax
cmp dword [ebx + 0x14], 0
push ebp
push esi
jbe 0x4c1a43
nop
cmp dword [ebx + 8], 0
jne 0x4c196a
mov eax, dword [ebx + 0x58]
test eax, eax
je 0x4c196a
mov esi, 0x4000
mov dword [esp + 0x14], esi
cmp eax, esi
jae 0x4c18a8
mov dword [esp + 0x14], eax
mov esi, eax
mov ecx, dword [ebx + 0x88]
add ecx, dword [ebx + 0x3c]
mov edx, dword [ebx + 0x80]
mov eax, dword [ebx + 0x7c]
push 0
push ecx
mov ecx, dword [ebx + 0x70]
push edx
push eax
call ecx
add esp, 0x10
test eax, eax
jne 0x4c1a4f
mov edx, dword [ebx]
mov eax, dword [ebx + 0x80]
mov ecx, dword [ebx + 0x7c]
push esi
push edx
mov edx, dword [ebx + 0x64]
push eax
push ecx
call edx
add esp, 0x10
cmp eax, esi
jne 0x4c1a4f
cmp dword [edi + 0xa0], 0
je 0x4c195c
xor ebp, ebp
test esi, esi
je 0x4c195c
lea esi, [edi + 0xa4]
jmp 0x4c1910
mov ecx, dword [edi + 0xac]
mov edx, dword [ebx]
and ecx, 0xfffd
or ecx, 2
mov eax, ecx
xor eax, 1
imul eax, ecx
movzx ecx, byte [edx + ebp]
shr eax, 8
and eax, 0xff
xor eax, ecx
mov byte [edx + ebp], al
mov edi, dword [edi + 0xb0]
movzx eax, al
call fcn.004c09e0
mov edx, dword [ebx]
mov edi, dword [esp + 0x1c]
mov byte [edx + ebp], al
inc ebp
cmp ebp, dword [esp + 0x14]
jb 0x4c1910
mov esi, dword [esp + 0x14]
mov eax, dword [ebx]
add dword [ebx + 0x3c], esi
sub dword [ebx + 0x58], esi
mov dword [ebx + 4], eax
mov dword [ebx + 8], esi
cmp dword [ebx + 0x84], 0
je 0x4c19db
cmp dword [ebx + 0x8c], 0
jne 0x4c19db
mov ecx, dword [ebx + 0x18]
mov edi, dword [ebx + 0x10]
lea edx, [ebx + 4]
push edx
mov dword [esp + 0x18], ecx
call fcn.004c3390
mov ebp, eax
add esp, 4
test ebp, ebp
js 0x4c19a3
cmp dword [ebx + 0x1c], 0
je 0x4c19a3
mov ebp, 0xfffffffd
mov esi, dword [ebx + 0x18]
sub esi, dword [esp + 0x14]
mov eax, dword [ebx + 0x50]
test edi, edi
jne 0x4c19b5
xor eax, eax
jmp 0x4c19be
mov edx, esi
mov ecx, edi
call fcn.0045ef80
sub dword [ebx + 0x5c], esi
add dword [esp + 0x10], esi
mov dword [ebx + 0x50], eax
cmp ebp, 1
je 0x4c1a43
test ebp, ebp
jne 0x4c1a5a
mov edi, dword [esp + 0x1c]
jmp 0x4c1a39
mov eax, dword [ebx + 8]
test eax, eax
jne 0x4c19e7
cmp dword [ebx + 0x58], eax
je 0x4c1a43
mov esi, dword [ebx + 0x14]
cmp esi, eax
jb 0x4c19f0
mov esi, eax
xor eax, eax
test esi, esi
je 0x4c1a07
mov ecx, dword [ebx + 4]
mov cl, byte [eax + ecx]
mov edx, dword [ebx + 0x10]
mov byte [eax + edx], cl
inc eax
cmp eax, esi
jb 0x4c19f6
mov ebp, dword [ebx + 0x10]
mov eax, dword [ebx + 0x50]
test ebp, ebp
jne 0x4c1a15
xor eax, eax
jmp 0x4c1a1e
mov edx, esi
mov ecx, ebp
call fcn.0045ef80
sub dword [ebx + 0x5c], esi
sub dword [ebx + 8], esi
sub dword [ebx + 0x14], esi
add dword [ebx + 4], esi
add dword [ebx + 0x18], esi
add ebp, esi
add dword [esp + 0x10], esi
mov dword [ebx + 0x50], eax
mov dword [ebx + 0x10], ebp
cmp dword [ebx + 0x14], 0
ja 0x4c1880
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret
pop esi
pop ebp
pop ebx
or eax, 0xffffffff
pop edi
add esp, 8
ret
pop esi
mov eax, ebp
pop ebp
pop ebx
pop edi
add esp, 8
ret