Function at 0x401560
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x810
mov eax, dword [0x43b698]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x810], ecx
push ebx
mov ebx, dword [ebp + 0xc]
mov ecx, eax
shr ecx, 0x18
mov edx, eax
shr edx, 0x10
push esi
mov esi, dword [ebp + 0x10]
mov byte [ebp - 0x804], cl
mov byte [ebp - 0x803], dl
mov ecx, eax
lea edx, [ebx + 8]
push edi
shr ecx, 8
push edx
mov byte [ebp - 0x802], cl
mov byte [ebp - 0x801], al
call fcn.0042cc74
mov ecx, eax
mov eax, ebx
add esp, 4
and eax, 0x80000003
mov dword [ebp - 0x80c], ecx
jns 0x4015ce
dec eax
or eax, 0xfffffffc
inc eax
push ebx
push esi
push ecx
jne 0x401610
lea eax, [ebx - 1]
mov byte [ebp - 0x806], al
mov byte [ebp - 0x805], al
call fcn.0042ccf4
movzx edi, byte [ebp - 0x806]
lea ecx, [edi + 1]
add esp, 0xc
xor eax, eax
test ecx, ecx
jle 0x401687
mov edi, edi
mov dl, byte [esi + eax]
xor byte [ebp - 0x805], dl
inc eax
cmp eax, ecx
jl 0x401600
jmp 0x401687
mov eax, ebx
cdq
and edx, 3
add eax, edx
sar eax, 2
add al, al
add al, al
add al, 3
mov byte [ebp - 0x806], al
mov byte [ebp - 0x805], al
call fcn.0042ccf4
add esp, 0xc
xor eax, eax
test ebx, ebx
jle 0x40164e
jmp 0x401640
mov cl, byte [esi + eax]
xor byte [ebp - 0x805], cl
inc eax
cmp eax, ebx
jl 0x401640
movzx edi, byte [ebp - 0x806]
cmp ebx, edi
jg 0x401687
mov edx, dword [ebp - 0x80c]
mov esi, edi
sub esi, ebx
inc esi
push esi
lea eax, [ebx + edx]
push 0xff
push eax
call fcn.0042ccee
add esp, 0xc
dec esi
mov al, byte [ebp - 0x805]
not al
mov byte [ebp - 0x805], al
jne 0x401676
mov cl, byte [ebp - 0x805]
mov ebx, dword [ebp - 0x80c]
mov dl, byte [ebp - 0x806]
mov esi, dword [ebp - 0x810]
mov byte [edi + ebx + 1], cl
mov ecx, dword [esi + 0xc]
push 0x31
mov byte [ebp - 0x800], dl
call fcn.0041f450
mov ecx, dword [esi + 0xc]
mov eax, dword [ecx]
mov eax, dword [eax + 0x30]
lea edx, [ebp - 0x804]
push edx
push 5
call eax
push 0x3ff
lea ecx, [ebp - 0x403]
push 0
push ecx
mov byte [ebp - 0x404], 0
call fcn.0042ccee
mov ecx, dword [esi + 0xc]
mov edx, dword [ecx]
mov edx, dword [edx + 0x38]
add esp, 0xc
lea eax, [ebp - 0x404]
push eax
push 1
call edx
mov al, byte [ebp - 0x404]
cmp al, 0x1f
jne 0x401715
pop edi
pop esi
mov al, 0x24
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042ccde
mov esp, ebp
pop ebp
ret 0x10
cmp al, 0x79
jne 0x401793
mov ecx, dword [esi + 0xc]
push 4
call fcn.0041f450
mov ecx, dword [esi + 0xc]
mov eax, dword [ecx]
mov edx, dword [eax + 0x30]
push ebx
add edi, 2
push edi
call edx
test ebx, ebx
je 0x40173f
push ebx
call fcn.0042ccfa
add esp, 4
xor edi, edi
xor ebx, ebx
mov ecx, dword [esi + 0xc]
mov eax, dword [ecx]
mov eax, dword [eax + 0x38]
lea edx, [ebp - 0x404]
push edx
push 1
call eax
cmp edi, 0x32
jge 0x401793
cmp eax, 1
jne 0x401789
mov al, byte [ebp - 0x404]
cmp al, 0x79
jne 0x401785
inc ebx
cmp ebx, 2
jne 0x401789
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042ccde
mov esp, ebp
pop ebp
ret 0x10
cmp al, 0x1f
je 0x401793
inc edi
mov byte [ebp - 0x404], 0xff
jmp 0x401743
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov al, 0x14
pop ebx
call fcn.0042ccde
mov esp, ebp
pop ebp
ret 0x10