Function at 0x4d1f80
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 0x6358dd
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, 0x6b1330
call fcn.00409430
lea eax, [ebp - 0x14]
xor edi, edi
mov dword [ebp - 0x30], eax
mov eax, dword [0x6b1334]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], edi
mov edx, dword [0x6b1348]
test dl, 1
jne 0x4d21e5
xor esi, esi
test dl, 2
jne 0x4d204b
mov ecx, dword [ebx + 8]
xor eax, eax
mov edx, 0x28
nop
ror eax, 0x19
lea ecx, [ecx + 4]
xor eax, dword [ecx - 4]
sub edx, 1
jne 0x4d2000
div dword [0x6b1340]
mov eax, dword [0x6b1344]
lea esi, [eax + edx*4]
mov dword [ebp - 0x18], esi
mov esi, dword [esi]
test esi, esi
je 0x4d2042
mov edx, dword [ebx + 8]
lea ecx, [esi + 4]
push 0xa0
call fcn.004250e0
add esp, 4
test al, al
jne 0x4d2067
mov esi, dword [esi]
test esi, esi
jne 0x4d2025
mov edx, dword [0x6b1348]
mov esi, dword [ebp - 0x18]
mov eax, dword [0x6b133c]
mov ecx, dword [0x6b1338]
cmp eax, ecx
jb 0x4d21a0
cmp ecx, 2
jb 0x4d207f
add ecx, ecx
jmp 0x4d2084
push dword [ebx + 0xc]
lea ecx, [esi + 0xa4]
call fcn.004d0b70
mov edi, dword [ebp - 0x14]
xor esi, esi
jmp 0x4d21ea
mov ecx, 2
cmp ecx, eax
jae 0x4d2092
mov esi, 3
jmp 0x4d21ea
mov eax, dword [0x6b1330]
push edx
push 0x6b1330
push ecx
mov eax, dword [eax + 8]
mov ecx, 0x6b1330
call eax
mov edi, eax
test edi, edi
je 0x4d21e2
mov cl, byte [edi + 0x18]
not cl
test cl, 1
je 0x4d21e2
mov ecx, dword [0x6b1344]
test ecx, ecx
je 0x4d2164
xor edx, edx
mov dword [ebp - 0x18], edx
cmp dword [0x6b1340], edx
jbe 0x4d2164
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], eax
mov esi, dword [eax + ecx]
test esi, esi
je 0x4d213a
nop
mov eax, dword [esi]
lea ecx, [esi + 4]
dec dword [0x6b133c]
mov edx, 0x28
mov dword [ebp - 0x24], eax
xor eax, eax
ror eax, 0x19
lea ecx, [ecx + 4]
xor eax, dword [ecx - 4]
sub edx, 1
jne 0x4d2105
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 0x4d20f0
mov ecx, dword [0x6b1344]
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 [0x6b1340]
jae 0x4d2164
mov ecx, dword [0x6b1344]
jmp 0x4d20e7
mov eax, dword [0x6b1330]
mov ecx, 0x6b1330
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, 0x28
ror eax, 0x19
xor eax, dword [ecx]
add ecx, 4
sub edx, 1
jne 0x4d2185
div dword [0x6b1340]
mov eax, dword [0x6b1344]
lea esi, [eax + edx*4]
push ecx
mov ecx, dword [0x6b1334]
push 0x6b1334
call fcn.004d3420
mov edi, eax
mov dword [ebp - 0x14], edi
test edi, edi
je 0x4d21e5
push dword [ebx + 0xc]
mov ecx, edi
push dword [ebx + 8]
call fcn.004d3600
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 [0x6b133c]
xor esi, esi
mov dword [ebp - 0x14], edi
jmp 0x4d21ea
mov edi, dword [ebp - 0x14]
mov esi, 2
test edi, edi
je 0x4d21fc
push ecx
mov ecx, dword [ebp - 0x28]
lea eax, [ebp - 0x2c]
push eax
push edi
call fcn.004d3310
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