Function at 0x51f7e0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5d1fda
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x68
push ebx
xor ebx, ebx
push esi
xor esi, esi
push edi
mov dword [esp + 0x24], ecx
mov dword [esp + 0xc], ebx
mov dword [esp + 0x18], esi
mov dword [esp + 0x10], ebx
jmp 0x51f822
xor ebx, ebx
lea ecx, [esp + 0x10]
lea edi, [esp + 0x54]
call fcn.0040f8d0
mov edi, eax
mov ecx, 0x688ebc
mov edx, 0x6a9db0
mov dword [esp + 0x7c], ebx
call fcn.00416e40
cmp dword [eax + 0x54], 0
lea ebx, [eax + 0x1c]
mov dword [esp + 0x1c], ebx
jne 0x51f855
xor eax, eax
jmp 0x51f8b9
mov ecx, dword [edi + 0x14]
cmp ecx, 0x10
jb 0x51f861
mov eax, dword [edi]
jmp 0x51f863
mov eax, edi
mov edx, dword [edi + 0x10]
add edx, eax
cmp ecx, 0x10
jb 0x51f875
mov ecx, dword [edi]
mov dword [esp + 0x14], ecx
jmp 0x51f87b
mov ecx, edi
mov dword [esp + 0x14], edi
xor eax, eax
cmp dword [esp + 0x14], edx
je 0x51f8a8
mov esi, eax
mov ebx, eax
shl esi, 6
shr ebx, 2
add esi, ebx
movsx ebx, byte [ecx]
lea esi, [esi + ebx - 0x61c88647]
inc ecx
xor eax, esi
cmp ecx, edx
jne 0x51f883
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
xor edx, edx
div dword [ebx + 0x2c]
mov eax, dword [ebx + 0x28]
push edi
lea eax, [eax + edx*4]
call fcn.004017e0
test eax, eax
setne bl
mov dword [esp + 0x7c], 0xffffffff
cmp dword [esp + 0x68], 0x10
jb 0x51f8da
mov ecx, dword [esp + 0x54]
push ecx
call fcn.0048f06d
add esp, 4
test bl, bl
je 0x51f95c
add esi, dword [0x6a57a8]
lea ecx, [esp + 0x10]
lea edi, [esp + 0x54]
mov dword [esp + 0x18], esi
call fcn.0040f8d0
mov edi, eax
mov ecx, 0x688ebc
mov edx, 0x6a9db0
mov dword [esp + 0x7c], 1
call fcn.00416e40
lea edx, [eax + 0x44]
mov ecx, edi
call fcn.0040f740
mov ecx, dword [eax + 0x2c]
mov eax, dword [0x6a5b84]
imul eax, ecx
shr eax, 1
add eax, 0x14
cmp dword [esp + 0xc], eax
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x1c]
jl 0x51f93a
lea eax, [esp + 0xc]
mov edx, dword [eax]
mov dword [esp + 0x7c], 0xffffffff
cmp dword [esp + 0x68], 0x10
mov dword [esp + 0xc], edx
jb 0x51f95c
mov eax, dword [esp + 0x54]
push eax
call fcn.0048f06d
add esp, 4
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
cmp eax, 0x10
jl 0x51f820
mov eax, dword [0x6a57a4]
cmp dword [esp + 0xc], eax
jge 0x51f97d
mov dword [esp + 0xc], eax
mov eax, dword [0x6a49e4]
sub eax, dword [esp + 0xc]
mov ecx, dword [0x6a7628]
cdq
sub eax, edx
sar eax, 1
xor ebx, ebx
mov dword [esp + 0x1c], eax
cmp ecx, ebx
je 0x51f9a4
mov edx, dword [ecx]
mov eax, dword [edx + 0x44]
call eax
jmp 0x51f9af
mov eax, dword [0x6a49e8]
sub eax, dword [0x6a546c]
sub eax, esi
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ebx
mov edi, edi
lea ecx, [esp + 0x10]
lea edi, [esp + 0x38]
call fcn.0040f8d0
mov ecx, 0x688ebc
mov edx, 0x6a9db0
mov dword [esp + 0x7c], 2
call fcn.00416e40
mov edi, eax
cmp dword [edi + 0x54], ebx
je 0x51fbf9
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x38]
mov edx, ecx
cmp eax, 0x10
jae 0x51fa02
lea edx, [esp + 0x38]
add edx, dword [esp + 0x48]
cmp eax, 0x10
jae 0x51fa0f
lea ecx, [esp + 0x38]
xor eax, eax
cmp ecx, edx
je 0x51fa34
mov esi, eax
mov ebx, eax
shl esi, 6
shr ebx, 2
add esi, ebx
movsx ebx, byte [ecx]
lea esi, [esi + ebx - 0x61c88647]
inc ecx
xor eax, esi
cmp ecx, edx
jne 0x51fa15
xor ebx, ebx
xor edx, edx
div dword [edi + 0x48]
mov ecx, dword [edi + 0x44]
lea eax, [ecx + edx*4]
lea edx, [esp + 0x38]
push edx
call fcn.004017e0
cmp eax, ebx
je 0x51fbf9
push 0x3b8
call fcn.0048f2c5
mov edi, eax
add esp, 4
mov dword [esp + 0x20], edi
mov byte [esp + 0x7c], 3
cmp edi, ebx
je 0x51fb71
test byte [0x6922ec], 1
jne 0x51faf5
or dword [0x6922ec], 1
mov byte [esp + 0x7c], 4
push 0x44
mov dword [0x6922f4], ebx
call fcn.0048f2c5
add esp, 4
cmp eax, ebx
je 0x51fc39
mov dword [0x6922f0], eax
mov dword [eax], eax
mov eax, dword [0x6922f0]
mov dword [eax + 4], eax
push 0x5eeeb0
mov dword [0x6922fc], ebx
mov dword [0x692314], 0xf
mov dword [0x692310], ebx
mov byte [0x692300], 0
mov byte [0x692332], 0
mov dword [0x69231c], ebx
mov dword [0x692320], ebx
mov dword [0x692324], ebx
call fcn.0048ef30
add esp, 4
mov byte [esp + 0x7c], 3
mov eax, dword [0x692eec]
mov ecx, dword [0x6922fc]
mov edx, dword [eax + 0x588]
mov eax, dword [ecx + 0x34]
cmp eax, dword [ecx + 0x38]
je 0x51fb1c
mov ecx, dword [ecx + 0x38]
cmp dword [eax], edx
je 0x51fb63
add eax, 0x14
cmp eax, ecx
jne 0x51fb11
mov byte [esp + 0x18], 0
mov ecx, 0x688ebc
mov edx, 0x6a9db0
call fcn.00416e40
lea edx, [eax + 0x44]
lea ecx, [esp + 0x38]
call fcn.0040f740
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0xc]
push ecx
mov ecx, dword [esp + 0x18]
push edx
mov edx, dword [esp + 0x24]
push ecx
push edx
add eax, 0x1c
push eax
mov eax, dword [esp + 0x24]
push eax
push edi
call fcn.00520c40
mov esi, eax
jmp 0x51fb73
mov ecx, dword [esp + 0x10]
mov dl, byte [eax + ecx + 4]
mov byte [esp + 0x18], dl
jmp 0x51fb21
xor esi, esi
mov byte [esp + 0x7c], 2
mov edi, dword [0x692f10]
mov ebx, dword [edi + 0x3c]
mov edx, dword [ebx + 4]
lea ecx, [esp + 0x20]
push ecx
push edx
push ebx
mov dword [esp + 0x2c], esi
call fcn.00406ce0
mov ecx, dword [edi + 0x40]
mov edx, 0x3ffffffe
sub edx, ecx
cmp edx, 1
jb 0x51fc62
inc ecx
mov dword [edi + 0x40], ecx
mov dword [ebx + 4], eax
mov ecx, dword [eax + 4]
mov dword [ecx], eax
mov edi, dword [edi + 0x3c]
mov edi, dword [edi + 4]
mov dword [esi + 0x190], edi
mov edi, dword [esp + 0x24]
push edi
mov ecx, esi
call fcn.0040ef40
mov al, byte [esi + 0x199]
mov edx, dword [esp + 0x10]
xor ecx, ecx
test al, al
setne cl
lea edi, [edi + edx*8 + 0x1a4]
lea eax, [ecx - 1]
and eax, esi
push eax
call fcn.0041a180
mov eax, dword [0x6a57a8]
add dword [esp + 0x14], eax
xor ebx, ebx
mov dword [esp + 0x7c], 0xffffffff
cmp dword [esp + 0x4c], 0x10
jb 0x51fc15
mov ecx, dword [esp + 0x38]
push ecx
call fcn.0048f06d
add esp, 4
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
cmp eax, 0x10
jl 0x51f9c0
mov ecx, dword [esp + 0x74]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [esp + 0x28]
push edx
lea ecx, [esp + 0x30]
mov dword [esp + 0x2c], ebx
call fcn.0048f111
push 0x661a10
lea eax, [esp + 0x30]
push eax
mov dword [esp + 0x34], vtable.std::bad_alloc.0
call fcn.00490659
push str.list_T__too_long
call fcn.0047cca5
int3