Function at 0x4d1170
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
mov dword [esp + 0x10], 0
test edi, edi
jne 0x4d1192
pop edi
pop esi
pop ebp
mov eax, 0xffffff9a
pop ebx
pop ecx
ret 0xc
mov esi, dword [edi + 0x9c]
test esi, esi
jne 0x4d11a9
pop edi
pop esi
pop ebp
mov eax, 0xffffff9a
pop ebx
pop ecx
ret 0xc
cmp dword [esi], 0
jne 0x4d11bb
pop edi
pop esi
pop ebp
mov eax, 0xffffff9c
pop ebx
pop ecx
ret 0xc
mov ecx, dword [esp + 0x20]
test ecx, ecx
jne 0x4d11cd
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 0xc
mov eax, dword [esp + 0x1c]
mov dword [esi + 0x14], ecx
mov dword [esi + 0x10], eax
mov eax, dword [esi + 0x5c]
cmp ecx, eax
jbe 0x4d11e1
mov dword [esi + 0x14], eax
mov eax, dword [esi + 0x14]
test eax, eax
jbe 0x4d13b9
jmp 0x4d11f2
mov edi, dword [esp + 0x18]
mov eax, dword [esi + 8]
test eax, eax
jne 0x4d12ce
mov eax, dword [esi + 0x58]
test eax, eax
jbe 0x4d12ce
mov ebp, 0x4000
cmp eax, ebp
jae 0x4d1217
mov ebp, eax
test ebp, ebp
je 0x4d11c3
mov ecx, dword [esi + 0x88]
mov ebx, dword [esi + 0x3c]
mov edx, dword [esi + 0x80]
mov eax, dword [esi + 0x7c]
add ecx, ebx
push 0
push ecx
push edx
push eax
call dword [esi + 0x70]
add esp, 0x10
test eax, eax
jne 0x4d13c5
mov ecx, dword [esi]
mov edx, dword [esi + 0x80]
mov eax, dword [esi + 0x7c]
push ebp
push ecx
push edx
push eax
call dword [esi + 0x64]
add esp, 0x10
cmp eax, ebp
jne 0x4d13c5
mov eax, dword [edi + 0xa0]
test eax, eax
je 0x4d12b6
xor edi, edi
test ebp, ebp
jbe 0x4d12b6
mov eax, dword [esp + 0x18]
mov ecx, dword [esi]
mov edx, dword [eax + 0xb0]
add eax, 0xa4
push edx
push eax
lea ebx, [ecx + edi]
call fcn.004d0e40
mov cl, byte [ebx]
xor cl, al
mov byte [ebx], cl
mov eax, dword [esi]
movsx ecx, byte [eax + edi]
mov eax, dword [esp + 0x20]
push ecx
mov edx, dword [eax + 0xb0]
add eax, 0xa4
push edx
push eax
call fcn.004d0e60
mov ecx, dword [esi]
add esp, 0x14
mov byte [ecx + edi], al
inc edi
cmp edi, ebp
jb 0x4d126b
mov ecx, dword [esi + 0x3c]
mov eax, dword [esi + 0x58]
mov edx, dword [esi]
add ecx, ebp
sub eax, ebp
mov dword [esi + 0x3c], ecx
mov dword [esi + 0x58], eax
mov dword [esi + 4], edx
mov dword [esi + 8], ebp
mov eax, dword [esi + 0x84]
test eax, eax
je 0x4d1335
mov eax, dword [esi + 0x8c]
test eax, eax
jne 0x4d1335
mov eax, dword [esi + 0x10]
mov ebx, dword [esi + 0x18]
lea ecx, [esi + 4]
push 2
push ecx
mov dword [esp + 0x28], eax
call fcn.004d2140
mov edi, dword [esi + 0x18]
mov ebp, eax
mov edx, dword [esp + 0x20]
mov eax, dword [esi + 0x50]
sub edi, ebx
push edi
push edx
push eax
call fcn.004d2740
mov edx, dword [esi + 0x5c]
mov dword [esi + 0x50], eax
mov ecx, dword [esp + 0x10]
sub edx, edi
add ecx, edi
cmp ebp, 1
mov dword [esi + 0x5c], edx
mov dword [esp + 0x10], ecx
je 0x4d13b9
test ebp, ebp
jne 0x4d13d0
jmp 0x4d13ae
mov eax, dword [esi + 8]
test eax, eax
jne 0x4d1343
mov ecx, dword [esi + 0x58]
test ecx, ecx
je 0x4d13b9
mov edi, dword [esi + 0x14]
cmp edi, eax
jb 0x4d134c
mov edi, eax
xor eax, eax
test edi, edi
jbe 0x4d1363
mov ecx, dword [esi + 4]
mov edx, dword [esi + 0x10]
mov cl, byte [eax + ecx]
mov byte [edx + eax], cl
inc eax
cmp eax, edi
jb 0x4d1352
mov edx, dword [esi + 0x10]
mov eax, dword [esi + 0x50]
push edi
push edx
push eax
call fcn.004d2740
mov ecx, dword [esi + 0x5c]
mov ebp, dword [esi + 0x14]
mov ebx, dword [esi + 0x10]
mov edx, dword [esi + 4]
mov dword [esi + 0x50], eax
mov eax, dword [esi + 8]
sub ecx, edi
sub eax, edi
mov dword [esi + 0x5c], ecx
mov ecx, dword [esi + 0x18]
mov dword [esi + 8], eax
mov eax, dword [esp + 0x10]
sub ebp, edi
add ebx, edi
add edx, edi
add ecx, edi
add eax, edi
mov dword [esi + 0x14], ebp
mov dword [esi + 0x10], ebx
mov dword [esi + 4], edx
mov dword [esi + 0x18], ecx
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x14]
test eax, eax
ja 0x4d11ee
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 0xc
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
pop ecx
ret 0xc
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
pop ecx
ret 0xc