Function at 0x5066ac
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x20b
push 0
push 0
dec ecx
jne 0x5066b4
push ecx
push ebx
push esi
push edi
xor eax, eax
push ebp
push 0x506ef9
push dword fs:[eax]
mov dword fs:[eax], esp
mov esi, pe_nt_image_headers32
mov eax, 0x609d38
xor edx, edx
mov dword [eax], edx
add eax, 4
dec esi
jne 0x5066d7
mov edx, dword [0x604f64]
mov edx, dword [edx]
lea eax, [ebp - 0x1034]
mov ecx, 0x506f0c
call fcn.004059a8
mov eax, dword [ebp - 0x1034]
mov edx, 0xb
call fcn.005fa5c4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x506ebb
lea edx, [ebp - 0x830]
mov ecx, 0xe
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0xc]
cmp eax, 0xe
jge 0x506742
lea eax, [ebp - 4]
call fcn.005fa88c
push 5
call fcn.00411ed0
jmp 0x506ebb
lea eax, [ebp - 0x2c]
mov edx, 0xe
call fcn.0040566c
lea eax, [ebp - 0x2c]
call fcn.00405538
mov edx, eax
lea eax, [ebp - 0x830]
mov ecx, 0xe
call fcn.0040310c
mov eax, dword [ebp - 0x2c]
mov edx, 0x506f38
call fcn.0040542c
je 0x506785
lea eax, [ebp - 4]
call fcn.005fa88c
jmp 0x506ebb
xor edi, edi
push ebp
push 0x506ea2
push dword fs:[edi]
mov dword fs:[edi], esp
jmp 0x506e6c
lea edx, [ebp - 0x830]
mov ecx, 0x2f
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0xc]
cmp eax, 0x2f
jl 0x506e98
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx]
push edx
push eax
mov eax, dword [ebp - 4]
call fcn.00420f0c
cmp edx, dword [esp + 4]
jne 0x5067d7
cmp eax, dword [esp]
pop edx
pop eax
jb 0x5067df
jmp 0x506e98
pop edx
pop eax
jge 0x506e98
lea edx, [ebp - 0x1030]
lea eax, [ebp - 0x830]
mov ecx, 0x2f
call fcn.0040310c
mov dx, 0x362f
mov esi, 0x2f
lea eax, [ebp - 0x830]
lea ecx, [ebp - 0x1030]
movzx ebx, dx
shr ebx, 8
xor bl, byte [eax]
mov byte [ecx], bl
xor ebx, ebx
mov bl, byte [eax]
add dx, bx
imul dx, dx, 0x5ab3
add dx, 0x8d1e
inc ecx
inc eax
dec esi
jne 0x50680a
lea edx, [ebp - 0x830]
lea eax, [ebp - 0x1030]
mov ecx, 0x2f
call fcn.0040310c
lea eax, [ebp - 0x2c]
mov edx, 0x14
call fcn.0040566c
lea eax, [ebp - 0x2c]
call fcn.00405538
mov edx, eax
lea eax, [ebp - 0x830]
mov ecx, 0x14
call fcn.0040310c
mov eax, dword [ebp - 0x2c]
call fcn.005f3308
mov esi, eax
mov al, byte [ebp - 0x81c]
mov byte [ebp - 0x25], al
lea eax, [ebp - 0x24]
mov edx, 0x1a
call fcn.0040566c
lea eax, [ebp - 0x24]
call fcn.00405538
mov edx, eax
lea eax, [ebp - 0x81b]
mov ecx, 0x1a
call fcn.0040310c
lea eax, [ebp - 0x1038]
push eax
mov ecx, 8
mov edx, 5
mov eax, dword [ebp - 0x24]
call fcn.00405540
mov eax, dword [ebp - 0x1038]
call fcn.005f48e4
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edx
lea eax, [ebp - 0x103c]
push eax
mov ecx, 4
mov edx, 0xd
mov eax, dword [ebp - 0x24]
call fcn.00405540
mov eax, dword [ebp - 0x103c]
call fcn.005f4934
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x1040]
push eax
mov ecx, 4
mov edx, 0x11
mov eax, dword [ebp - 0x24]
call fcn.00405540
mov eax, dword [ebp - 0x1040]
call fcn.005f4934
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x1044]
push eax
mov ecx, 4
mov edx, 0x15
mov eax, dword [ebp - 0x24]
call fcn.00405540
mov eax, dword [ebp - 0x1044]
call fcn.005f4934
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x24]
call fcn.00405538
add eax, 0x18
lea edx, [ebp - 6]
mov ecx, 2
call fcn.0040310c
cmp word [ebp - 6], 0
je 0x506e6c
cmp word [ebp - 6], 0x800
ja 0x506e98
movzx ecx, word [ebp - 6]
lea edx, [ebp - 0x830]
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0xc]
movzx edx, word [ebp - 6]
cmp eax, edx
jl 0x506e98
cmp dword [ebp - 0xc], 0
jne 0x50699e
cmp dword [ebp - 0x10], 0x40000
jbe 0x5069b2
jmp 0x5069a0
jle 0x5069b2
mov edx, esi
mov eax, dword [ebp - 0x2c]
call 0x503400
test eax, eax
je 0x506e6c
mov edx, esi
mov eax, dword [ebp - 0x2c]
call fcn.00505f74
mov ebx, eax
test ebx, ebx
jne 0x5069fc
mov eax, 0x90
call fcn.0040bf90
mov ebx, eax
mov eax, dword [ebp - 0x2c]
movzx eax, byte [eax]
mov eax, dword [eax*4 + 0x609d38]
test eax, eax
jne 0x5069e9
xor eax, eax
mov dword [ebx + 0x88], eax
jmp 0x5069ef
mov dword [ebx + 0x88], eax
mov eax, dword [ebp - 0x2c]
movzx eax, byte [eax]
mov dword [eax*4 + 0x609d38], ebx
mov eax, ebx
call fcn.005027e4
lea eax, [ebx + 0x14]
mov edx, dword [ebp - 0x2c]
call fcn.00405064
mov word [ebx + 0x1c], si
xor eax, eax
mov dword [ebx + 0x28], eax
mov dword [ebx + 0x2c], eax
mov al, byte [ebp - 0x25]
mov byte [ebx + 0x7c], al
mov eax, dword [ebp - 0x10]
mov dword [ebx + 0x70], eax
mov eax, dword [ebp - 0xc]
mov dword [ebx + 0x74], eax
mov byte [ebx + 0x7d], 1
mov eax, dword [ebp - 0x14]
mov dword [ebx + 0x60], eax
mov eax, dword [ebp - 0x18]
mov dword [ebx + 0x64], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebx + 0x68], eax
mov byte [ebx + 0x7d], 1
lea edx, [ebp - 0x1048]
mov al, byte [ebx + 0x7c]
call fcn.004f5a44
mov edx, dword [ebp - 0x1048]
lea eax, [ebx + 0x40]
call fcn.00405064
mov byte [ebx + 0x7e], 0
movzx ecx, word [ebp - 6]
lea edx, [ebp - 0x1030]
lea eax, [ebp - 0x830]
call fcn.0040310c
mov dx, 0x3630
movzx eax, word [ebp - 6]
dec eax
test eax, eax
jl 0x506aba
inc eax
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x830]
lea esi, [ebp - 0x1030]
movzx ecx, dx
shr ecx, 8
xor cl, byte [eax]
mov byte [esi], cl
xor ecx, ecx
mov cl, byte [eax]
add dx, cx
imul dx, dx, 0x5ab3
add dx, 0x8d1e
inc esi
inc eax
dec dword [ebp - 0x30]
jne 0x506a98
movzx ecx, word [ebp - 6]
lea edx, [ebp - 0x830]
lea eax, [ebp - 0x1030]
call fcn.0040310c
movzx edx, word [ebp - 6]
lea eax, [ebp - 0x20]
call fcn.0040566c
lea eax, [ebp - 0x20]
call fcn.00405538
mov edx, eax
movzx ecx, word [ebp - 6]
lea eax, [ebp - 0x830]
call fcn.0040310c
mov esi, 0xf
mov eax, dword [ebp - 0x20]
call fcn.004052e0
cmp eax, 3
jl 0x506cc3
mov eax, dword [ebp - 0x20]
mov al, byte [eax]
mov byte [ebp - 0x26], al
lea eax, [ebp - 0x20]
call fcn.00405538
inc eax
lea edx, [ebp - 6]
mov ecx, 2
call fcn.0040310c
lea eax, [ebp - 0x20]
mov ecx, 3
mov edx, 1
call fcn.00405580
xor eax, eax
mov al, byte [ebp - 0x26]
cmp eax, 0x12
ja case.0x506b48.0
jmp dword [eax*4 + 0x506b4f]
lea eax, [ebx + 0x50]
push eax
movzx ecx, word [ebp - 6]
mov edx, 1
mov eax, dword [ebp - 0x20]
call fcn.00405540
jmp case.0x506b48.0
lea eax, [ebx + 0x30]
push eax
movzx ecx, word [ebp - 6]
mov edx, 1
mov eax, dword [ebp - 0x20]
call fcn.00405540
jmp case.0x506b48.0
lea eax, [ebx + 0x38]
push eax
movzx ecx, word [ebp - 6]
mov edx, 1
mov eax, dword [ebp - 0x20]
call fcn.00405540
jmp case.0x506b48.0
lea eax, [ebx + 0x34]
push eax
movzx ecx, word [ebp - 6]
mov edx, 1
mov eax, dword [ebp - 0x20]
call fcn.00405540
jmp case.0x506b48.0
lea eax, [ebx + 0x3c]
push eax
movzx ecx, word [ebp - 6]
mov edx, 1
mov eax, dword [ebp - 0x20]
call fcn.00405540
jmp case.0x506b48.0
lea eax, [ebx + 0x58]
push eax
movzx ecx, word [ebp - 6]
mov edx, 1
mov eax, dword [ebp - 0x20]
call fcn.00405540
jmp case.0x506b48.0
lea eax, [ebx + 0x44]
push eax
movzx ecx, word [ebp - 6]
mov edx, 1
mov eax, dword [ebp - 0x20]
call fcn.00405540
jmp case.0x506b48.0
lea eax, [ebx + 0x4c]
push eax
movzx ecx, word [ebp - 6]
mov edx, 1
mov eax, dword [ebp - 0x20]
call fcn.00405540
jmp case.0x506b48.0
lea eax, [ebx + 0x54]
push eax
movzx ecx, word [ebp - 6]
mov edx, 1
mov eax, dword [ebp - 0x20]
call fcn.00405540
jmp case.0x506b48.0
lea eax, [ebx + 0x48]
push eax
movzx ecx, word [ebp - 6]
mov edx, 1
mov eax, dword [ebp - 0x20]
call fcn.00405540
jmp case.0x506b48.0
mov byte [ebx + 0x7e], 1
jmp case.0x506b48.0
lea eax, [ebx + 0x18]
push eax
movzx ecx, word [ebp - 6]
mov edx, 1
mov eax, dword [ebp - 0x20]
call fcn.00405540
movzx ecx, word [ebp - 6]
lea eax, [ebp - 0x20]
mov edx, 1
call fcn.00405580
dec esi
jne 0x506af9
lea edx, [ebp - 0x1050]
mov eax, dword [ebx + 0x50]
call fcn.0040cf08
mov eax, dword [ebp - 0x1050]
lea edx, [ebp - 0x104c]
call fcn.0040c074
mov edx, dword [ebp - 0x104c]
lea eax, [ebx + 0x20]
call fcn.00405064
mov eax, dword [ebx + 0x30]
call fcn.004052e0
cmp eax, 0x40
jle 0x506d14
mov eax, dword [ebx + 0x30]
call fcn.004052e0
mov ecx, eax
lea eax, [ebx + 0x30]
mov edx, 0x40
call fcn.00405580
mov eax, dword [ebx + 0x38]
call fcn.004052e0
cmp eax, 0x40
jle 0x506d38
mov eax, dword [ebx + 0x38]
call fcn.004052e0
mov ecx, eax
lea eax, [ebx + 0x38]
mov edx, 0x40
call fcn.00405580
mov eax, dword [ebx + 0x34]
call fcn.004052e0
cmp eax, 0x40
jle 0x506d5c
mov eax, dword [ebx + 0x34]
call fcn.004052e0
mov ecx, eax
lea eax, [ebx + 0x34]
mov edx, 0x40
call fcn.00405580
mov eax, dword [ebx + 0x3c]
call fcn.004052e0
cmp eax, 0x40
jle 0x506d80
mov eax, dword [ebx + 0x3c]
call fcn.004052e0
mov ecx, eax
lea eax, [ebx + 0x3c]
mov edx, 0x40
call fcn.00405580
mov eax, dword [ebx + 0x4c]
call fcn.004052e0
cmp eax, 0x40
jle 0x506da4
mov eax, dword [ebx + 0x4c]
call fcn.004052e0
mov ecx, eax
lea eax, [ebx + 0x4c]
mov edx, 0x40
call fcn.00405580
mov eax, dword [ebx + 0x58]
call fcn.004052e0
cmp eax, 0x40
jle 0x506dc8
mov eax, dword [ebx + 0x58]
call fcn.004052e0
mov ecx, eax
lea eax, [ebx + 0x58]
mov edx, 0x40
call fcn.00405580
mov eax, dword [ebx + 0x48]
call fcn.004052e0
cmp eax, 0xff
jle 0x506dee
mov eax, dword [ebx + 0x48]
call fcn.004052e0
mov ecx, eax
lea eax, [ebx + 0x48]
mov edx, 0xff
call fcn.00405580
mov eax, dword [ebx + 0x54]
call fcn.004052e0
cmp eax, 0x64
jle 0x506e12
mov eax, dword [ebx + 0x54]
call fcn.004052e0
mov ecx, eax
lea eax, [ebx + 0x54]
mov edx, 0x64
call fcn.00405580
cmp byte [ebx + 0x7c], 3
jne 0x506e6c
lea edx, [ebp - 0x1054]
mov eax, dword [ebx + 0x30]
call fcn.0040c43c
mov edx, dword [ebp - 0x1054]
lea eax, [ebx + 0x30]
call fcn.00405064
lea edx, [ebp - 0x1058]
mov eax, dword [ebx + 0x38]
call fcn.0040c43c
mov edx, dword [ebp - 0x1058]
lea eax, [ebx + 0x38]
call fcn.00405064
lea edx, [ebp - 0x105c]
mov eax, dword [ebx + 0x34]
call fcn.0040c43c
mov edx, dword [ebp - 0x105c]
lea eax, [ebx + 0x34]
call fcn.00405064
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx]
push edx
push eax
mov eax, dword [ebp - 4]
call fcn.00420f0c
cmp edx, dword [esp + 4]
jne 0x506e90
cmp eax, dword [esp]
pop edx
pop eax
jb 0x506798
jmp 0x506e98
pop edx
pop eax
jl 0x506798
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x506eac
lea eax, [ebp - 4]
call fcn.005fa88c
push 5
call fcn.00411ed0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x506f00
lea eax, [ebp - 0x105c]
mov edx, 0xa
call fcn.00405034
lea eax, [ebp - 0x1034]
call fcn.00405700
lea eax, [ebp - 0x2c]
call fcn.00405010
lea eax, [ebp - 0x24]
mov edx, 2
call fcn.00405034
ret