Function at 0x4d7c90
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x5d0
mov eax, dword [0x572844]
xor eax, esp
mov dword [esp + 0x5cc], eax
push ebx
mov ebx, dword [esp + 0x5ec]
push ebp
mov ebp, dword [esp + 0x5e0]
mov dword [esp + 0x34], ebx
push esi
mov esi, dword [esp + 0x5e0]
push edi
mov edi, dword [esp + 0x5fc]
mov dword [esp + 0x40], edi
cmp ebp, 0x100
jbe 0x4d7ce0
mov eax, dword [esi + 0x400]
mov dword [esp + 0x38], eax
jmp 0x4d7ce8
mov dword [esp + 0x38], 0x10
push 0x44
lea eax, [esp + 0x54]
push 0
push eax
call fcn.005201d0
add esp, 0xc
mov ecx, esi
mov edx, ebp
lea ecx, [ecx]
mov eax, dword [ecx]
lea ecx, [ecx + 4]
inc dword [esp + eax*4 + 0x50]
sub edx, 1
jne 0x4d7d00
cmp dword [esp + 0x50], ebp
jne 0x4d7d35
mov dword [ebx], edx
mov dword [edi], edx
xor eax, eax
mov ecx, dword [esp + 0x5dc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0051dca8
add esp, 0x5d0
ret 0x1c
mov ecx, 1
lea ebx, [ebx]
cmp dword [esp + ecx*4 + 0x50], 0
jne 0x4d7d4d
inc ecx
cmp ecx, 0x10
jbe 0x4d7d40
mov eax, ecx
mov dword [esp + 0x24], eax
cmp dword [edi], ecx
jae 0x4d7d59
mov dword [edi], ecx
mov edx, 0x10
mov edi, edi
cmp dword [esp + edx*4 + 0x50], 0
jne 0x4d7d6c
sub edx, 1
jne 0x4d7d60
mov dword [esp + 0x28], edx
cmp dword [edi], edx
jbe 0x4d7d76
mov dword [edi], edx
mov ebx, 1
shl ebx, cl
cmp ecx, edx
jae 0x4d7d8e
sub ebx, dword [esp + ecx*4 + 0x50]
js 0x4d7da5
inc ecx
add ebx, ebx
cmp ecx, edx
jb 0x4d7d81
lea ecx, [edx*4]
mov eax, ebx
sub ebx, dword [esp + ecx + 0x50]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x4c], ebx
jns 0x4d7daf
mov eax, 2
jmp 0x4d7d1a
mov dword [esp + ecx + 0x50], eax
lea edi, [esp + 0x54]
xor ecx, ecx
lea ebx, [esp + 0x9c]
mov dword [esp + 0x98], ecx
sub edx, 1
je 0x4d7de2
lea esp, [esp]
mov eax, dword [edi]
lea edi, [edi + 4]
add ecx, eax
lea ebx, [ebx + 4]
mov dword [ebx - 4], ecx
sub edx, 1
jne 0x4d7dd0
push 0x480
lea eax, [esp + 0x160]
push 0
push eax
call fcn.005201d0
add esp, 0xc
xor ecx, ecx
jmp 0x4d7e00
mov edx, dword [esi]
lea esi, [esi + 4]
test edx, edx
je 0x4d7e1f
mov eax, dword [esp + edx*4 + 0x94]
mov dword [esp + eax*4 + 0x15c], ecx
inc eax
mov dword [esp + edx*4 + 0x94], eax
inc ecx
cmp ecx, ebp
jb 0x4d7e00
mov eax, dword [esp + 0x2c]
xor edx, edx
mov ebx, dword [esp + 0x24]
or edi, 0xffffffff
xor esi, esi
mov dword [esp + 0x20], 0
xor ebp, ebp
mov dword [esp + 0x30], edi
mov eax, dword [esp + eax + 0x94]
mov dword [esp + 0x48], eax
lea eax, [esp + 0x15c]
mov dword [esp + 0x94], 0
mov dword [esp + 0x1c], eax
mov dword [esp + 0xd8], 0
mov dword [esp + 0x10], edx
mov dword [esp + 0x11c], edx
cmp ebx, dword [esp + 0x28]
jg 0x4d8114
mov ecx, dword [esp + 0x28]
lea eax, [esp + 0x50]
lea eax, [eax + ebx*4]
mov dword [esp + 0x34], eax
mov eax, dword [eax]
test eax, eax
je 0x4d80fc
jmp 0x4d7ea0
mov dword [esp + 0x44], eax
dec eax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + edi*4 + 0xdc]
add eax, edx
cmp ebx, eax
jle 0x4d7fdd
lea ebx, [ebx]
mov eax, dword [esp + edi*4 + 0xdc]
mov esi, ecx
add edx, eax
inc edi
mov eax, dword [esp + 0x40]
sub esi, edx
mov dword [esp + 0x30], edi
mov dword [esp + 0x10], edx
mov eax, dword [eax]
cmp esi, eax
jbe 0x4d7ee2
mov esi, eax
sub ebx, edx
mov eax, 1
mov ecx, ebx
shl eax, cl
cmp eax, dword [esp + 0x44]
jbe 0x4d7f1c
mov edx, dword [esp + 0x34]
or ecx, 0xffffffff
sub ecx, dword [esp + 0x2c]
inc ebx
add eax, ecx
cmp ebx, esi
jae 0x4d7f18
mov ecx, dword [edx + 4]
lea edx, [edx + 4]
add eax, eax
cmp eax, ecx
jbe 0x4d7f18
inc ebx
sub eax, ecx
cmp ebx, esi
jb 0x4d7f05
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x38]
lea eax, [edx + ebx]
cmp eax, ecx
jbe 0x4d7f2f
cmp edx, ecx
jae 0x4d7f2f
mov ebx, ecx
sub ebx, edx
mov ecx, ebx
mov dword [esp + edi*4 + 0xdc], ebx
mov ebp, 1
shl ebp, cl
lea eax, [ebp*8 + 8]
push eax
call fcn.00525bb0
add esp, 4
test eax, eax
je 0x4d8141
mov ecx, dword [esp + 0x3c]
lea esi, [eax + 8]
add eax, 4
mov dword [esp + edi*4 + 0x11c], esi
mov dword [esp + 0x3c], eax
mov dword [ecx], esi
mov dword [eax], 0
test edi, edi
je 0x4d7fc6
mov eax, dword [esp + 0x20]
mov edx, 1
mov ecx, dword [esp + 0x10]
shl edx, cl
sub ecx, dword [esp + edi*4 + 0xd8]
dec edx
and edx, dword [esp + 0x20]
mov dword [esp + edi*4 + 0x94], eax
mov al, byte [esp + edi*4 + 0xd8]
mov byte [esp + 0x15], al
lea eax, [ebx + 0x20]
shr edx, cl
mov byte [esp + 0x14], al
mov eax, dword [esp + edi*4 + 0x118]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x18], esi
mov dword [eax + edx*8], ecx
mov ecx, esi
mov dword [eax + edx*8 + 4], ecx
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x28]
lea eax, [edx + ebx]
mov ebx, dword [esp + 0x24]
cmp ebx, eax
jg 0x4d7ec0
mov al, bl
sub al, dl
mov byte [esp + 0x15], al
mov eax, dword [esp + 0x48]
lea eax, [esp + eax*4 + 0x15c]
cmp dword [esp + 0x1c], eax
jb 0x4d7ffd
mov byte [esp + 0x14], 0x63
jmp 0x4d8053
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
add eax, 4
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x5ec]
cmp ecx, eax
jae 0x4d802b
cmp ecx, 0x100
mov word [esp + 0x18], cx
setb al
add al, 0x1f
mov byte [esp + 0x14], al
jmp 0x4d8053
sub ecx, eax
mov eax, dword [esp + 0x5f4]
mov al, byte [ecx + eax]
mov byte [esp + 0x14], al
mov eax, dword [esp + 0x5f0]
mov ax, word [eax + ecx*2]
mov word [esp + 0x18], ax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x20]
mov ecx, ebx
sub ecx, edx
mov ebx, 1
shl ebx, cl
mov ecx, edx
shr eax, cl
cmp eax, ebp
jae 0x4d8087
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
mov dword [esi + eax*8], ecx
mov dword [esi + eax*8 + 4], edi
add eax, ebx
cmp eax, ebp
jb 0x4d8072
mov edx, dword [esp + 0x10]
mov edi, dword [esp + 0x30]
mov ecx, dword [esp + 0x24]
mov eax, 1
mov ebx, dword [esp + 0x20]
lea ecx, [ecx - 1]
shl eax, cl
test ebx, eax
je 0x4d80a8
lea ecx, [ecx]
xor ebx, eax
shr eax, 1
test ebx, eax
jne 0x4d80a0
xor ebx, eax
mov ecx, edx
mov eax, 1
mov dword [esp + 0x20], ebx
shl eax, cl
dec eax
and eax, ebx
cmp eax, dword [esp + edi*4 + 0x94]
je 0x4d80e8
sub edx, dword [esp + edi*4 + 0xd8]
dec edi
mov eax, 1
mov ecx, edx
shl eax, cl
dec eax
and eax, ebx
cmp eax, dword [esp + edi*4 + 0x94]
jne 0x4d80c3
mov dword [esp + 0x30], edi
mov dword [esp + 0x10], edx
mov eax, dword [esp + 0x2c]
mov ebx, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
test eax, eax
jne 0x4d7ea0
mov eax, dword [esp + 0x34]
inc ebx
add eax, 4
mov dword [esp + 0x24], ebx
mov dword [esp + 0x34], eax
cmp ebx, ecx
jle 0x4d7e91
cmp dword [esp + 0x4c], 0
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0xdc]
mov dword [ecx], eax
je 0x4d7d18
cmp dword [esp + 0x28], 1
je 0x4d7d18
mov eax, 1
jmp 0x4d7d1a
test edi, edi
je 0x4d8165
mov eax, dword [esp + 0x11c]
test eax, eax
je 0x4d8165
mov esi, dword [eax - 4]
sub eax, 8
push eax
call fcn.00525b95
add esp, 4
mov eax, esi
test esi, esi
jne 0x4d8150
mov eax, 3
jmp 0x4d7d1a