Function at 0x4d6780
Capabilities:
Encode data using xor

Disassembly:
push ebp
sub esp, 0x6b0
lea ebp, [esp - 4]
mov eax, dword [0x665ebc]
xor eax, ebp
mov dword [ebp + 0x6b0], eax
push 0x5a4
mov eax, 0x5e81a4
call fcn.0059ca24
mov ebx, dword [ebp + 0x6bc]
mov esi, ecx
cmp byte [esi + 0x108], 0
mov dword [ebp - 0x2c], ebx
jne 0x4d67c3
xor eax, eax
inc eax
jmp 0x4d6dbf
cmp byte [esi + 0x109], 0
je 0x4d67d4
push 2
pop eax
jmp 0x4d6dbf
lea ecx, [ebp + 0xd8]
call fcn.004b0c41
and dword [ebp - 4], 0
push 0x1c
lea eax, [ebx + 0x24]
push eax
lea edi, [esi + 0xa1]
push edi
mov dword [ebp - 0x1c], 1
call fcn.0059d730
add esp, 0xc
push 0x100
lea eax, [ebp + 0x13c]
push eax
push edi
mov ecx, esi
call fcn.004d664c
lea eax, [ebp + 0x13c]
push eax
call fcn.005a8096
lea edi, [eax + eax + 2]
pop ecx
mov dword [ebp - 0x28], edi
cmp dword [ebx + 0x40], 0
je 0x4d6847
push 0x14
add ebx, 0x10
lea eax, [ebp + 0x68c]
push ebx
push eax
call fcn.0059d730
add esp, 0xc
jmp 0x4d6932
cmp byte [esi + 0xfd], 0
je 0x4d6869
lea eax, [ebp + 0x68c]
push eax
push edi
lea eax, [ebp + 0x13c]
push eax
push 0x14
add ebx, 0x10
jmp 0x4d6926
cmp dword [ebp - 0x1c], 0
jne 0x4d6915
cmp byte [esi + 0xfe], 0
je 0x4d6915
lea ecx, [ebp + 0x35c]
call fcn.004b12f1
push 0x20
lea eax, [ebp + 0x5fc]
push eax
push 0x2710
lea ebx, [edi - 2]
push ebx
lea eax, [ebp + 0x13c]
push eax
push 0x10
pop edi
push edi
push dword [ebp - 0x2c]
lea ecx, [ebp + 0x35c]
mov byte [ebp - 4], 1
call fcn.004b1929
push edi
lea eax, [ebp + 0x5fc]
push eax
push 1
push ebx
lea eax, [ebp + 0x13c]
push eax
push 0x20
lea eax, [ebp + 0x5fc]
push eax
lea ecx, [ebp + 0x35c]
call fcn.004b1929
lea eax, [ebp + 0x68c]
push eax
push dword [ebp - 0x28]
lea eax, [ebp + 0x13c]
push eax
push edi
lea eax, [ebp + 0x5fc]
push eax
lea ecx, [ebp + 0xd8]
call fcn.004b11be
lea ecx, [ebp + 0x35c]
mov byte [ebp - 4], 0
call fcn.004b12fa
jmp 0x4d6935
lea eax, [ebp + 0x68c]
push eax
push edi
lea eax, [ebp + 0x13c]
push eax
push 0x10
push ebx
lea ecx, [ebp + 0xd8]
call fcn.004b11be
push 0x10
pop edi
mov eax, dword [esi + 0x100]
mov ecx, dword [eax]
xor edx, edx
inc edx
mov dword [ebp - 0x10], ecx
lea ebx, [eax + 4]
cmp ecx, edx
jne 0x4d6972
add eax, 0x14
mov dword [ebp - 0x14], eax
lea eax, [ebp + 0x63c]
push eax
push edi
push ebx
push 0x14
lea eax, [ebp + 0x68c]
push eax
lea ecx, [ebp + 0xd8]
call fcn.004b11be
jmp 0x4d6b93
lea ecx, [eax + 0x20]
mov dword [ebp - 0x14], ecx
mov ecx, dword [eax + 0x14]
mov eax, dword [eax + 0x1c]
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x18], eax
cmp eax, 0x6610
jne 0x4d6b3d
lea eax, [ebp + 0x63c]
push eax
push edx
push ecx
push edi
push ebx
push 0x14
lea eax, [ebp + 0x68c]
push eax
mov ecx, esi
call fcn.004d6568
lea ecx, [ebp]
call fcn.004f3aba
and dword [ebp - 0x10], 0
push 0x100
lea eax, [ebp + 0x63c]
push eax
lea eax, [ebp - 0x1a4]
push eax
mov byte [ebp - 4], 4
call fcn.004d1672
push edi
lea eax, [ebp + 0x65c]
push eax
lea eax, [ebp + 0x67c]
push eax
call fcn.0059d730
mov eax, dword [esi + 0x104]
sub eax, 0x20
add esp, 0x18
test eax, eax
jle 0x4d6a83
mov ebx, dword [ebp - 0x14]
lea eax, [ebp + 0x4bc]
sub eax, ebx
mov dword [ebp - 0x20], eax
lea eax, [ebp + 0x6a0]
push eax
lea eax, [ebp - 0x1a4]
push ebx
push eax
call fcn.004d1be9
mov eax, dword [ebp + 0x67c]
xor dword [ebp + 0x6a0], eax
mov eax, dword [ebp + 0x680]
xor dword [ebp + 0x6a4], eax
mov eax, dword [ebp + 0x684]
xor dword [ebp + 0x6a8], eax
mov eax, dword [ebp + 0x688]
xor dword [ebp + 0x6ac], eax
push edi
lea eax, [ebp + 0x6a0]
push eax
mov eax, dword [ebp - 0x20]
add eax, ebx
push eax
call fcn.0059d730
push edi
lea eax, [ebp + 0x67c]
push ebx
push eax
call fcn.0059d730
mov eax, dword [esi + 0x104]
add dword [ebp - 0x10], edi
sub eax, 0x20
add esp, 0x24
add ebx, edi
cmp dword [ebp - 0x10], eax
jl 0x4d6a08
lea eax, [ebp + 0x5fc]
push eax
push edi
lea eax, [ebp + 0x4bc]
push eax
push 0x14
lea eax, [ebp + 0x68c]
push eax
lea ecx, [ebp]
call fcn.004f4ff3
lea eax, [ebp + 0x5bc]
push eax
push 0x40
pop edi
push edi
lea eax, [ebp + 0x50c]
push eax
push edi
lea eax, [ebp + 0x5fc]
push eax
lea ecx, [ebp]
call fcn.004f4ff3
push edi
lea eax, [ebp + 0x5bc]
push eax
lea eax, [ebp + 0x4cc]
push eax
call fcn.005a1df6
add esp, 0xc
test eax, eax
jne 0x4d6afe
push edi
lea eax, [ebp + 0x50c]
push eax
lea eax, [esi + 0xbd]
push eax
mov byte [esi + 0x109], 1
call fcn.0059d730
add esp, 0xc
lea ecx, [ebp]
mov byte [ebp - 4], 0
call fcn.004f3ac3
cmp byte [esi + 0x109], 0
jne 0x4d6dae
cmp dword [ebp - 0x1c], 0
je 0x4d6dae
cmp byte [esi + 0xfe], 0
je 0x4d6dae
and dword [ebp - 0x1c], 0
mov ebx, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x28]
jmp 0x4d6827
cmp eax, 0x6603
je 0x4d6b47
mov dword [ebp - 0x10], edx
lea eax, [ebp + 0x63c]
push eax
push edx
push ecx
push edi
push ebx
push 0x14
lea eax, [ebp + 0x68c]
push eax
mov ecx, esi
call fcn.004d6492
cmp dword [ebp - 0x10], 2
jne 0x4d6b86
lea eax, [ebp + 0x650]
push eax
push 2
push dword [ebp - 0x24]
lea eax, [ebp + 0x68c]
push edi
push ebx
push 0x14
push eax
mov ecx, esi
call fcn.004d6492
cmp dword [ebp - 0x18], 0x6801
jne 0x4d6c74
lea ecx, [ebp - 0x5b0]
call fcn.004aa64a
push 0x14
pop ebx
push ebx
lea eax, [ebp + 0x63c]
push eax
lea ecx, [ebp - 0x5b0]
mov byte [ebp - 4], 2
call fcn.004aa66d
push 0x64
push dword [ebp - 0x14]
lea eax, [ebp + 0x4bc]
push eax
call fcn.0059d730
add esp, 0xc
push 0x64
lea eax, [ebp + 0x4bc]
push eax
lea ecx, [ebp - 0x5b0]
call fcn.004aa742
push 0x40
lea eax, [ebp + 0x4e0]
push eax
lea eax, [esi + 0xbd]
push eax
call fcn.0059d730
add esp, 0xc
lea eax, [ebp + 0x5fc]
push eax
push edi
lea eax, [ebp + 0x4bc]
push eax
push ebx
lea eax, [ebp + 0x68c]
push eax
lea ecx, [ebp + 0xd8]
call fcn.004b11be
lea eax, [ebp + 0x5bc]
push eax
push 0x40
lea eax, [ebp + 0x4e0]
push eax
push ebx
lea eax, [ebp + 0x5fc]
push eax
lea ecx, [ebp + 0xd8]
call fcn.004b11be
push ebx
lea eax, [ebp + 0x5bc]
push eax
lea eax, [ebp + 0x4cc]
push eax
call fcn.005a1df6
add esp, 0xc
neg eax
sbb al, al
inc al
lea ecx, [ebp - 0x5b0]
mov byte [esi + 0x109], al
mov byte [ebp - 4], 0
call fcn.004aa653
jmp 0x4d6b0a
cmp dword [ebp - 0x18], 0x6603
jne 0x4d6b0a
lea ecx, [ebp - 0xb0]
call fcn.0048cdc6
lea eax, [ebp + 0x33c]
push eax
lea eax, [ebp + 0x63c]
push eax
lea ecx, [ebp - 0xb0]
mov byte [ebp - 4], 3
call fcn.0048d166
mov eax, dword [ebp + 0x654]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x658]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
lea ecx, [ebp + 0x4bc]
xor ebx, ebx
sub eax, ecx
mov dword [ebp - 0x24], eax
jmp 0x4d6cd0
mov eax, dword [ebp - 0x24]
lea ecx, [ebp + 0x33c]
push ecx
push 8
lea edi, [ebp + ebx + 0x4bc]
add eax, edi
push edi
push eax
lea ecx, [ebp - 0xb0]
mov dword [ebp - 0x20], eax
call fcn.0048e800
mov eax, dword [ebp - 0x18]
xor dword [edi], eax
mov eax, dword [ebp - 0x10]
xor dword [edi + 4], eax
mov eax, dword [ebp - 0x20]
mov eax, dword [eax]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + ebx + 4]
add ebx, 8
mov dword [ebp - 0x10], eax
cmp ebx, 0x68
jb 0x4d6ccd
lea eax, [ebp + 0x5fc]
push eax
push 0x10
lea eax, [ebp + 0x4bc]
push eax
push 0x14
lea eax, [ebp + 0x68c]
push eax
lea ecx, [ebp + 0xd8]
call fcn.004b11be
lea eax, [ebp + 0x5bc]
push eax
push 0x40
lea eax, [ebp + 0x4e4]
push eax
push 0x14
lea eax, [ebp + 0x5fc]
push eax
lea ecx, [ebp + 0xd8]
call fcn.004b11be
push 0x14
lea eax, [ebp + 0x5bc]
push eax
lea eax, [ebp + 0x4cc]
push eax
call fcn.005a1df6
add esp, 0xc
test eax, eax
jne 0x4d6d9a
push 0x40
lea eax, [ebp + 0x4e4]
push eax
lea eax, [esi + 0xbd]
push eax
mov byte [esi + 0x109], 1
call fcn.0059d730
add esp, 0xc
lea ecx, [ebp - 0xb0]
mov byte [ebp - 4], 0
call fcn.0048cdcf
jmp 0x4d6b0a
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xd8]
call fcn.004b0c4a
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x6b0]
xor ecx, ebp
call fcn.0059ca15
add ebp, 0x6b4
leave
ret 4