Function at 0x4d1a70
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6358ad
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x20
push esi
push edi
mov eax, dword [0x6a6040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, 0x6b1360
call fcn.00409430
lea eax, [ebp - 0x14]
xor edi, edi
mov dword [ebp - 0x30], eax
mov eax, dword [0x6b1364]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], edi
mov edx, dword [0x6b1378]
test dl, 1
jne 0x4d1cd5
xor esi, esi
test dl, 2
jne 0x4d1b3b
mov ecx, dword [ebx + 8]
xor eax, eax
mov edx, 0x30
nop
ror eax, 0x19
lea ecx, [ecx + 4]
xor eax, dword [ecx - 4]
sub edx, 1
jne 0x4d1af0
div dword [0x6b1370]
mov eax, dword [0x6b1374]
lea esi, [eax + edx*4]
mov dword [ebp - 0x18], esi
mov esi, dword [esi]
test esi, esi
je 0x4d1b32
mov edx, dword [ebx + 8]
lea ecx, [esi + 4]
push 0xc0
call fcn.004250e0
add esp, 4
test al, al
jne 0x4d1b57
mov esi, dword [esi]
test esi, esi
jne 0x4d1b15
mov edx, dword [0x6b1378]
mov esi, dword [ebp - 0x18]
mov eax, dword [0x6b136c]
mov ecx, dword [0x6b1368]
cmp eax, ecx
jb 0x4d1c90
cmp ecx, 2
jb 0x4d1b6f
add ecx, ecx
jmp 0x4d1b74
push dword [ebx + 0xc]
lea ecx, [esi + 0xc4]
call fcn.004d0b70
mov edi, dword [ebp - 0x14]
xor esi, esi
jmp 0x4d1cda
mov ecx, 2
cmp ecx, eax
jae 0x4d1b82
mov esi, 3
jmp 0x4d1cda
mov eax, dword [0x6b1360]
push edx
push 0x6b1360
push ecx
mov eax, dword [eax + 8]
mov ecx, 0x6b1360
call eax
mov edi, eax
test edi, edi
je 0x4d1cd2
mov cl, byte [edi + 0x18]
not cl
test cl, 1
je 0x4d1cd2
mov ecx, dword [0x6b1374]
test ecx, ecx
je 0x4d1c54
xor edx, edx
mov dword [ebp - 0x18], edx
cmp dword [0x6b1370], edx
jbe 0x4d1c54
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], eax
mov esi, dword [eax + ecx]
test esi, esi
je 0x4d1c2a
nop
mov eax, dword [esi]
lea ecx, [esi + 4]
dec dword [0x6b136c]
mov edx, 0x30
mov dword [ebp - 0x24], eax
xor eax, eax
ror eax, 0x19
lea ecx, [ecx + 4]
xor eax, dword [ecx - 4]
sub edx, 1
jne 0x4d1bf5
div dword [edi + 0x10]
mov eax, dword [edi + 0x14]
lea ecx, [eax + edx*4]
mov eax, dword [ecx]
mov dword [esi], eax
mov eax, dword [ebp - 0x24]
mov dword [ecx], esi
mov esi, eax
inc dword [edi + 0xc]
test eax, eax
jne 0x4d1be0
mov ecx, dword [0x6b1374]
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x20]
inc edx
add eax, 4
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x1c], eax
mov dword [esi + ecx], 0
add esi, 4
mov dword [ebp - 0x20], esi
cmp edx, dword [0x6b1370]
jae 0x4d1c54
mov ecx, dword [0x6b1374]
jmp 0x4d1bd7
mov eax, dword [0x6b1360]
mov ecx, 0x6b1360
push edi
call dword [eax + 4]
mov eax, dword [edi]
mov ecx, edi
push 1
call dword [eax + 0xc]
mov ecx, dword [ebx + 8]
xor eax, eax
mov edx, 0x30
ror eax, 0x19
xor eax, dword [ecx]
add ecx, 4
sub edx, 1
jne 0x4d1c75
div dword [0x6b1370]
mov eax, dword [0x6b1374]
lea esi, [eax + edx*4]
push ecx
mov ecx, dword [0x6b1364]
push 0x6b1364
call fcn.004d3770
mov edi, eax
mov dword [ebp - 0x14], edi
test edi, edi
je 0x4d1cd5
push dword [ebx + 0xc]
mov ecx, edi
push dword [ebx + 8]
call fcn.004d3950
mov eax, dword [ebp - 0x14]
xor edi, edi
mov ecx, dword [esi]
mov dword [eax], ecx
mov eax, dword [ebp - 0x14]
mov dword [esi], eax
inc dword [0x6b136c]
xor esi, esi
mov dword [ebp - 0x14], edi
jmp 0x4d1cda
mov edi, dword [ebp - 0x14]
mov esi, 2
test edi, edi
je 0x4d1cec
push ecx
mov ecx, dword [ebp - 0x28]
lea eax, [ebp - 0x2c]
push eax
push edi
call fcn.004d3660
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0xc