Function at 0x506f48
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff004
push eax
add esp, 0xffffffdc
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x1024], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], eax
xor eax, eax
push ebp
push 0x5075a6
push dword fs:[eax]
mov dword fs:[eax], esp
call fcn.00505e90
mov edx, dword [0x604f64]
mov edx, dword [edx]
lea eax, [ebp - 0x1024]
mov ecx, 0x5075b8
call fcn.004059a8
mov eax, dword [ebp - 0x1024]
mov edx, 0xb
call fcn.005fa5c4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x507573
lea edx, [ebp - 0x820]
mov ecx, 0xe
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0xc]
cmp eax, 0xe
jge 0x506fe0
lea eax, [ebp - 4]
call fcn.005fa88c
push 5
call fcn.00411ed0
jmp 0x507573
lea eax, [ebp - 0x18]
mov edx, 0xe
call fcn.0040566c
lea eax, [ebp - 0x18]
call fcn.00405538
mov edx, eax
lea eax, [ebp - 0x820]
mov ecx, 0xe
call fcn.0040310c
mov eax, dword [ebp - 0x18]
mov edx, 0x5075e4
call fcn.0040542c
je 0x507023
lea eax, [ebp - 4]
call fcn.005fa88c
jmp 0x507573
xor edi, edi
push ebp
push 0x507542
push dword fs:[edi]
mov dword fs:[edi], esp
jmp 0x50750c
lea eax, [ebp - 0x10]
call fcn.00405010
lea edx, [ebp - 0x820]
mov ecx, 0x17
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0xc]
cmp eax, 0x17
jl 0x507538
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx]
sub eax, 1
sbb edx, 0
push edx
push eax
mov eax, dword [ebp - 4]
call fcn.00420f0c
cmp edx, dword [esp + 4]
jne 0x507083
cmp eax, dword [esp]
pop edx
pop eax
jb 0x50708b
jmp 0x507538
pop edx
pop eax
jge 0x507538
lea edx, [ebp - 0x1020]
lea eax, [ebp - 0x820]
mov ecx, 0x17
call fcn.0040310c
mov dx, 0x362f
mov esi, 0x17
lea eax, [ebp - 0x820]
lea ecx, [ebp - 0x1020]
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 0x5070b6
lea edx, [ebp - 0x820]
lea eax, [ebp - 0x1020]
mov ecx, 0x17
call fcn.0040310c
lea eax, [ebp - 0x18]
mov edx, 0x14
call fcn.0040566c
lea eax, [ebp - 0x18]
call fcn.00405538
mov edx, eax
lea eax, [ebp - 0x820]
mov ecx, 0x14
call fcn.0040310c
mov eax, dword [ebp - 0x18]
call fcn.005f3308
mov esi, eax
lea eax, [ebp - 0x10]
mov edx, 7
call fcn.0040566c
lea eax, [ebp - 0x10]
call fcn.00405538
mov edx, eax
lea eax, [ebp - 0x80c]
mov ecx, 3
call fcn.0040310c
mov eax, dword [ebp - 0x10]
mov al, byte [eax]
cmp al, 1
sete byte [ebp - 0x12]
lea eax, [ebp - 0x10]
call fcn.00405538
inc eax
lea edx, [ebp - 6]
mov ecx, 2
call fcn.0040310c
cmp word [ebp - 6], 0
je 0x50750c
cmp word [ebp - 6], 0x400
ja 0x507538
movzx ecx, word [ebp - 6]
lea edx, [ebp - 0x820]
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0xc]
movzx edx, word [ebp - 6]
cmp eax, edx
jl 0x507538
mov edx, esi
mov eax, dword [ebp - 0x18]
call fcn.005065a4
mov ebx, eax
test ebx, ebx
jne 0x5071de
mov eax, 0x50
call fcn.0040bf90
mov ebx, eax
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax]
mov eax, dword [eax*4 + 0x609938]
test eax, eax
jne 0x5071ce
xor eax, eax
mov dword [ebx + 0x48], eax
jmp 0x5071d1
mov dword [ebx + 0x48], eax
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax]
mov dword [eax*4 + 0x609938], ebx
mov eax, ebx
call fcn.00502864
mov eax, ebx
mov edx, dword [ebp - 0x18]
call fcn.00405064
xor eax, eax
mov dword [ebx + 0x40], eax
mov dword [ebx + 0x44], eax
mov word [ebx + 4], si
mov al, byte [ebp - 0x12]
mov byte [ebx + 0x39], al
mov byte [ebx + 0x38], 0
movzx ecx, word [ebp - 6]
lea edx, [ebp - 0x1020]
lea eax, [ebp - 0x820]
call fcn.0040310c
mov dx, 0x3630
movzx eax, word [ebp - 6]
dec eax
test eax, eax
jl 0x507259
inc eax
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x820]
lea esi, [ebp - 0x1020]
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 - 0x20]
jne 0x507237
movzx ecx, word [ebp - 6]
lea edx, [ebp - 0x820]
lea eax, [ebp - 0x1020]
call fcn.0040310c
movzx edx, word [ebp - 6]
lea eax, [ebp - 0xc]
call fcn.0040566c
lea eax, [ebp - 0xc]
call fcn.00405538
mov edx, eax
movzx ecx, word [ebp - 6]
lea eax, [ebp - 0x820]
call fcn.0040310c
mov esi, 0xc
mov eax, dword [ebp - 0xc]
call fcn.004052e0
cmp eax, 3
jl 0x5073ea
mov eax, dword [ebp - 0xc]
mov al, byte [eax]
mov byte [ebp - 0x11], al
lea eax, [ebp - 0xc]
call fcn.00405538
inc eax
lea edx, [ebp - 6]
mov ecx, 2
call fcn.0040310c
lea eax, [ebp - 0xc]
mov ecx, 3
mov edx, 1
call fcn.00405580
lea eax, [ebp - 0x1c]
push eax
movzx ecx, word [ebp - 6]
mov edx, 1
mov eax, dword [ebp - 0xc]
call fcn.00405540
xor eax, eax
mov al, byte [ebp - 0x11]
cmp eax, 0x11
ja case.0x5072fc.0
jmp dword [eax*4 + 0x507303]
lea eax, [ebx + 8]
mov edx, dword [ebp - 0x1c]
call fcn.00405064
jmp case.0x5072fc.0
lea eax, [ebx + 0x10]
mov edx, dword [ebp - 0x1c]
call fcn.00405064
jmp case.0x5072fc.0
lea eax, [ebx + 0xc]
mov edx, dword [ebp - 0x1c]
call fcn.00405064
jmp case.0x5072fc.0
lea eax, [ebx + 0x14]
mov edx, dword [ebp - 0x1c]
call fcn.00405064
jmp case.0x5072fc.0
lea eax, [ebx + 0x30]
mov edx, dword [ebp - 0x1c]
call fcn.00405064
jmp case.0x5072fc.0
lea eax, [ebx + 0x24]
mov edx, dword [ebp - 0x1c]
call fcn.00405064
jmp case.0x5072fc.0
lea eax, [ebx + 0x2c]
mov edx, dword [ebp - 0x1c]
call fcn.00405064
jmp case.0x5072fc.0
lea eax, [ebx + 0x20]
mov edx, dword [ebp - 0x1c]
call fcn.00405064
jmp case.0x5072fc.0
mov eax, dword [ebp - 0x1c]
call fcn.005f4934
call fcn.004cfeb8
fstp qword [ebx + 0x40]
wait
jmp case.0x5072fc.0
mov byte [ebx + 0x38], 1
lea eax, [ebp - 0x1c]
call fcn.00405010
movzx ecx, word [ebp - 6]
lea eax, [ebp - 0xc]
mov edx, 1
call fcn.00405580
dec esi
jne 0x507298
mov eax, dword [ebx + 8]
call fcn.004052e0
cmp eax, 0x40
jle 0x50740e
mov eax, dword [ebx + 8]
call fcn.004052e0
mov ecx, eax
lea eax, [ebx + 8]
mov edx, 0x40
call fcn.00405580
mov eax, dword [ebx + 0x10]
call fcn.004052e0
cmp eax, 0x40
jle 0x507432
mov eax, dword [ebx + 0x10]
call fcn.004052e0
mov ecx, eax
lea eax, [ebx + 0x10]
mov edx, 0x40
call fcn.00405580
mov eax, dword [ebx + 0xc]
call fcn.004052e0
cmp eax, 0x40
jle 0x507456
mov eax, dword [ebx + 0xc]
call fcn.004052e0
mov ecx, eax
lea eax, [ebx + 0xc]
mov edx, 0x40
call fcn.00405580
mov eax, dword [ebx + 0x14]
call fcn.004052e0
cmp eax, 0x40
jle 0x50747a
mov eax, dword [ebx + 0x14]
call fcn.004052e0
mov ecx, eax
lea eax, [ebx + 0x14]
mov edx, 0x40
call fcn.00405580
mov eax, dword [ebx + 0x24]
call fcn.004052e0
cmp eax, 0x40
jle 0x50749e
mov eax, dword [ebx + 0x24]
call fcn.004052e0
mov ecx, eax
lea eax, [ebx + 0x24]
mov edx, 0x40
call fcn.00405580
mov eax, dword [ebx + 0x30]
call fcn.004052e0
cmp eax, 0x40
jle 0x5074c2
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 + 0x20]
call fcn.004052e0
cmp eax, 0xff
jle 0x5074e8
mov eax, dword [ebx + 0x20]
call fcn.004052e0
mov ecx, eax
lea eax, [ebx + 0x20]
mov edx, 0xff
call fcn.00405580
mov eax, dword [ebx + 0x2c]
call fcn.004052e0
cmp eax, 0x64
jle 0x50750c
mov eax, dword [ebx + 0x2c]
call fcn.004052e0
mov ecx, eax
lea eax, [ebx + 0x2c]
mov edx, 0x64
call fcn.00405580
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 0x507530
cmp eax, dword [esp]
pop edx
pop eax
jb 0x507036
jmp 0x507538
pop edx
pop eax
jl 0x507036
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x50754c
lea eax, [ebp - 4]
call fcn.005fa88c
lea eax, [ebp - 0xc]
call fcn.00405010
lea eax, [ebp - 0x10]
call fcn.00405010
lea eax, [ebp - 0x18]
call fcn.00405010
push 5
call fcn.00411ed0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5075ad
lea eax, [ebp - 0x1024]
call fcn.00405700
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.00405034
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.00405034
ret