Function at 0x524930
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x24
mov eax, dword [0x463df0]
xor eax, esp
mov dword [esp + 0x20], eax
push ebx
mov ebx, dword [esp + 0x2c]
mov ecx, dword [ebx]
push ebp
mov ebp, dword [esp + 0x38]
push esi
push edi
mov edi, dword [esp + 0x3c]
mov dword [esp + 0x14], ecx
cmp ecx, 0x60
ja case.0x524964.1
movzx eax, byte [ecx + 0x524cb8]
jmp dword [eax*4 + 0x524ca4]
mov ecx, dword [esp + 0x44]
push ecx
push edi
mov ecx, ebp
mov eax, ebx
call fcn.005248c0
add esp, 8
jmp case.0x524964.1
mov dl, byte [ebx + 0x14]
mov esi, dword [ebx + 0x10]
mov eax, dword [esp + 0x44]
mov byte [esp + 0x13], dl
test dl, dl
je 0x5249f0
cmp eax, 8
jae 0x5249b3
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.00526a8a
add esp, 0x24
ret 0x10
test edi, edi
je 0x5249f0
cmp edi, ebp
jne 0x5249f0
cmp ecx, 0x20
je 0x5249da
cmp ecx, 0x30
jne case.0x524964.1
push eax
push edi
add ebx, 0x20
push ebx
push esi
call fcn.00525910
jmp case.0x524964.1
push eax
push edi
add ebx, 0x20
push ebx
push esi
call fcn.00525990
jmp case.0x524964.1
cmp eax, 0x10
jae 0x524a06
cmp eax, 8
jb 0x524a99
test dl, dl
jne 0x524a99
mov edx, dword [ebp]
mov dword [esp + 0x20], edx
mov edx, dword [ebp + 4]
add ebp, 8
mov dword [esp + 0x24], edx
cmp ecx, 0x20
je 0x524a48
cmp ecx, 0x30
jne 0x524a75
cmp byte [esp + 0x13], 0
je 0x524a3b
push 8
lea eax, [esp + 0x24]
push eax
lea ecx, [ebx + 0x20]
push ecx
push esi
call fcn.00525910
jmp 0x524a6d
lea edx, [esp + 0x20]
push edx
push esi
call fcn.00525770
jmp 0x524a6d
cmp byte [esp + 0x13], 0
je 0x524a62
push 8
lea eax, [esp + 0x24]
push eax
lea ecx, [ebx + 0x20]
push ecx
push esi
call fcn.00525990
jmp 0x524a6d
lea edx, [esp + 0x20]
push edx
push esi
call fcn.00525810
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x44]
test edi, edi
je 0x524a89
mov edx, dword [esp + 0x20]
mov dword [edi], edx
mov edx, dword [esp + 0x24]
mov dword [edi + 4], edx
add edi, 8
mov dl, byte [esp + 0x13]
sub eax, 8
mov dword [esp + 0x44], eax
jmp 0x5249f0
test eax, eax
je case.0x524964.1
test dl, dl
je 0x524b10
push eax
lea eax, [esp + 0x24]
push ebp
push eax
call fcn.00526df0
mov eax, dword [esp + 0x20]
add esp, 0xc
cmp eax, 0x20
je 0x524ad8
cmp eax, 0x30
jne 0x524aec
mov ecx, dword [esp + 0x44]
push ecx
lea edx, [esp + 0x24]
push edx
add ebx, 0x20
push ebx
push esi
call fcn.00525910
jmp 0x524aec
mov eax, dword [esp + 0x44]
push eax
lea ecx, [esp + 0x24]
push ecx
add ebx, 0x20
push ebx
push esi
call fcn.00525990
test edi, edi
je case.0x524964.1
mov edx, dword [esp + 0x44]
push edx
lea eax, [esp + 0x24]
push eax
push edi
call fcn.00526df0
add esp, 0xc
jmp case.0x524964.1
mov eax, dword [esp + 0x44]
mov ecx, dword [ebx + 0x10]
mov dword [esp + 0x18], ecx
test eax, eax
je case.0x524964.1
jmp 0x524b25
mov eax, dword [esp + 0x44]
mov esi, eax
cmp eax, 8
jb 0x524b31
mov esi, 8
xor eax, eax
lea edx, [esp + 0x20]
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
push 8
push edx
mov ecx, edx
mov eax, ebx
call fcn.005248c0
mov ecx, dword [esp + 0x20]
add esp, 8
lea eax, [esp + 0x20]
push eax
push ecx
call fcn.00525770
test edi, edi
je 0x524b79
xor eax, eax
test esi, esi
jbe 0x524b7b
mov dl, byte [esp + eax + 0x20]
xor dl, byte [ebp]
inc eax
mov byte [edi], dl
inc edi
inc ebp
cmp eax, esi
jb 0x524b67
jmp 0x524b7b
add ebp, esi
sub dword [esp + 0x44], esi
jne 0x524b21
jmp case.0x524964.1
mov esi, dword [esp + 0x44]
mov eax, dword [ebx + 4]
cmp ecx, 0x40
mov ecx, dword [ebx + 8]
sete byte [esp + 0x13]
dec ecx
mov dword [esp + 0x1c], eax
test esi, ecx
jne 0x524999
test edi, edi
je 0x524bb8
cmp ebp, edi
je 0x524bb8
push esi
push ebp
push edi
call fcn.00526df0
add esp, 0xc
mov ecx, dword [esp + 0x1c]
shr esi, cl
cmp esi, 2
jl case.0x524964.1
dec esi
cmp byte [esp + 0x13], 0
mov dword [esp + 0x18], esi
je 0x524bdb
mov ecx, esi
mov dword [esp + 0x14], ecx
jmp 0x524be7
mov dword [esp + 0x14], 1
mov ecx, dword [esp + 0x14]
mov edx, dword [ebx + 0x18]
mov ebx, dword [ebx + 0x1c]
mov dword [esp + 0x20], edx
test esi, esi
jle case.0x524964.1
lea ebp, [ecx + 1]
jmp 0x524c04
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
test cl, 1
jne 0x524c0f
mov eax, ebx
xor edx, edx
div ebp
mov esi, ecx
mov ecx, dword [esp + 0x1c]
shl esi, cl
add esi, edi
shl edx, cl
add edx, edi
test edi, edi
je case.default.0x524c2a
cmp ecx, 3
ja case.default.0x524c2a
jmp dword [ecx*4 + 0x524d1c]
mov cl, byte [edx]
mov al, byte [esi]
mov byte [esi], cl
mov byte [edx], al
jmp case.default.0x524c2a
movzx eax, word [esi]
mov cx, word [edx]
mov word [esi], cx
mov word [edx], ax
jmp case.default.0x524c2a
mov ecx, dword [edx]
mov eax, dword [esi]
mov dword [esi], ecx
mov dword [edx], eax
jmp case.default.0x524c2a
mov ecx, dword [edx]
mov eax, dword [esi]
mov dword [esi], ecx
mov ecx, dword [edx + 4]
mov dword [edx], eax
mov eax, dword [esi + 4]
mov dword [esi + 4], ecx
mov dword [edx + 4], eax
cmp byte [esp + 0x13], 0
je 0x524c75
dec dword [esp + 0x14]
dec ebp
jmp 0x524c7a
inc dword [esp + 0x14]
inc ebp
mov eax, dword [esp + 0x18]
dec eax
mov dword [esp + 0x18], eax
test eax, eax
jg 0x524c00
mov ecx, dword [esp + 0x30]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00526a8a
add esp, 0x24
ret 0x10