Function at 0x51f530
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d1978
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x44
push ebx
push esi
push edi
mov dword [ebp - 0x10], 0
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
cmp dword [eax + ecx*8 + 0x1a4], 0
lea ecx, [ebp - 0x10]
je 0x51f6db
lea edi, [ebp - 0x50]
call fcn.0040f8d0
mov esi, eax
mov ecx, 0x688ebc
mov edx, 0x6a9db0
mov dword [ebp - 4], 0
call fcn.00416e40
cmp dword [eax + 0x54], 0
lea edi, [eax + 0x1c]
mov dword [ebp - 0x18], edi
jne 0x51f59c
xor eax, eax
jmp 0x51f5f8
mov ecx, dword [esi + 0x14]
cmp ecx, 0x10
jb 0x51f5a8
mov eax, dword [esi]
jmp 0x51f5aa
mov eax, esi
mov edx, dword [esi + 0x10]
add edx, eax
cmp ecx, 0x10
jb 0x51f5bb
mov ecx, dword [esi]
mov dword [ebp - 0x14], ecx
jmp 0x51f5c0
mov ecx, esi
mov dword [ebp - 0x14], esi
xor eax, eax
cmp dword [ebp - 0x14], edx
je 0x51f5e7
mov edi, eax
mov ebx, eax
shl edi, 6
shr ebx, 2
add edi, ebx
movsx ebx, byte [ecx]
lea edi, [edi + ebx - 0x61c88647]
inc ecx
xor eax, edi
cmp ecx, edx
jne 0x51f5c7
mov edi, dword [ebp - 0x18]
xor edx, edx
div dword [edi + 0x2c]
mov eax, dword [edi + 0x28]
push esi
lea eax, [eax + edx*4]
call fcn.004017e0
test eax, eax
sete bl
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x3c], 0x10
jb 0x51f616
mov ecx, dword [ebp - 0x50]
push ecx
call fcn.0048f06d
add esp, 4
test bl, bl
jne 0x51f7bf
lea ecx, [ebp - 0x10]
lea edi, [ebp - 0x50]
call fcn.0040f8d0
mov esi, eax
mov ecx, 0x688ebc
mov edx, 0x6a9db0
mov dword [ebp - 4], 1
call fcn.00416e40
lea edx, [eax + 0x44]
mov ecx, esi
call fcn.0040f740
cmp dword [eax + 0x30], 0x10
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 0x10]
mov ecx, dword [edx + ecx*8 + 0x1a4]
mov esi, dword [eax + 0x2c]
jb 0x51f666
mov ebx, dword [eax + 0x1c]
jmp 0x51f669
lea ebx, [eax + 0x1c]
mov edi, dword [ecx + 0x1c4]
mov edx, edi
mov eax, edi
cmp edi, esi
jb 0x51f679
mov eax, esi
cmp dword [ecx + 0x1c8], 0x10
jb 0x51f68a
mov edx, dword [ecx + 0x1b4]
jmp 0x51f690
lea edx, [ecx + 0x1b4]
push eax
mov ecx, ebx
call fcn.00401700
add esp, 4
test eax, eax
jne 0x51f6b1
cmp edi, esi
jae 0x51f6a8
or eax, 0xffffffff
jmp 0x51f6af
xor eax, eax
cmp edi, esi
setne al
test eax, eax
sete al
test al, al
sete bl
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x3c], 0x10
jb 0x51f796
mov edx, dword [ebp - 0x50]
push edx
call fcn.0048f06d
add esp, 4
jmp 0x51f796
lea edi, [ebp - 0x34]
call fcn.0040f8d0
mov edi, eax
mov dword [ebp - 0x18], edi
mov ecx, 0x688ebc
mov edx, 0x6a9db0
mov dword [ebp - 4], 2
call fcn.00416e40
mov esi, eax
cmp dword [esi + 0x54], 0
jne 0x51f70a
xor eax, eax
jmp 0x51f766
mov ecx, dword [edi + 0x14]
cmp ecx, 0x10
jb 0x51f716
mov eax, dword [edi]
jmp 0x51f718
mov eax, edi
mov edx, dword [edi + 0x10]
add edx, eax
cmp ecx, 0x10
jb 0x51f729
mov ecx, dword [edi]
mov dword [ebp - 0x14], ecx
jmp 0x51f72e
mov ecx, edi
mov dword [ebp - 0x14], edi
xor eax, eax
cmp dword [ebp - 0x14], edx
je 0x51f755
mov edi, eax
mov ebx, eax
shl edi, 6
shr ebx, 2
add edi, ebx
movsx ebx, byte [ecx]
lea edi, [edi + ebx - 0x61c88647]
inc ecx
xor eax, edi
cmp ecx, edx
jne 0x51f735
mov edi, dword [ebp - 0x18]
xor edx, edx
div dword [esi + 0x48]
mov eax, dword [esi + 0x44]
push edi
lea eax, [eax + edx*4]
call fcn.004017e0
test eax, eax
setne bl
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x20], 0x10
jb 0x51f784
mov ecx, dword [ebp - 0x34]
push ecx
call fcn.0048f06d
add esp, 4
mov dword [ebp - 0x20], 0xf
mov dword [ebp - 0x24], 0
mov byte [ebp - 0x34], 0
test bl, bl
jne 0x51f7bf
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x10], eax
cmp eax, 0x10
jl 0x51f555
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor al, al
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4