Function at 0x411990
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c34a0
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x515e20]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edx, dword [0x517280]
mov dword [ebp - 0x18], 0
lea ecx, [edx + 1]
lea eax, [edx + 2]
imul eax, ecx
imul eax, edx
cdq
mov ecx, 0x16
idiv ecx
cmp edx, 3
jne 0x4119f5
push 0x8b
push 0x8a
push str._d__d_n
call fcn.0049f507
add esp, 0xc
mov eax, dword [0x5159f8]
mov ecx, 0x5159f8
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
push eax
mov dword [ebp - 4], 0
call fcn.0042d410
add esp, 4
mov byte [ebp - 4], 1
call fcn.00415a70
test al, al
jne 0x411ab7
mov edx, dword [0x517280]
xor esi, esi
mov ecx, esi
and ecx, 1
dec ecx
not ecx
and ecx, edx
mov eax, esi
sar eax, 1
xor ecx, eax
mov eax, ecx
and eax, 1
dec eax
not eax
and eax, edx
sar ecx, 1
xor eax, ecx
mov ecx, eax
and ecx, 1
dec ecx
sar eax, 1
not ecx
and ecx, edx
xor ecx, eax
mov eax, ecx
and eax, 1
dec eax
not eax
and eax, edx
sar ecx, 1
xor eax, ecx
mov ecx, eax
and ecx, 1
dec ecx
sar eax, 1
not ecx
and ecx, edx
xor ecx, eax
mov eax, ecx
and eax, 1
dec eax
not eax
and eax, edx
sar ecx, 1
xor eax, ecx
mov ecx, eax
and ecx, 1
dec ecx
sar eax, 1
not ecx
and ecx, edx
xor ecx, eax
mov eax, ecx
and eax, 1
dec eax
not eax
and eax, edx
sar ecx, 1
xor eax, ecx
inc esi
add edx, eax
cmp esi, 0x100
jl 0x411a34
mov dword [0x517280], edx
push dword [ebp - 0x14]
lea eax, [ebp - 0x10]
push str.ffver_s
push eax
call fcn.00405280
mov esi, dword [0x517280]
mov eax, esi
imul eax, esi
imul eax, esi
cdq
mov ecx, 9
idiv ecx
add esp, 0xc
cmp edx, 4
jne 0x411b1e
mov eax, 0x51eb851f
imul esi
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
imul ecx, ecx, 0x64
sub esi, ecx
xor ecx, ecx
lea eax, [esi + 0x63]
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0049d210
push eax
call fcn.0049ee63
add esp, 8
mov esi, dword [ebp - 0x10]
add esi, 0xfffffff0
mov ecx, dword [esi]
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi + 0xc], 0
lea edx, [esi + 0xc]
mov ecx, eax
jl 0x411b47
cmp ecx, dword [esi]
jne 0x411b47
mov edi, esi
mov eax, 1
lock xadd dword [edx], eax
jmp 0x411b84
mov eax, dword [ecx]
push 2
push dword [esi + 4]
call dword [eax]
mov edi, eax
test edi, edi
jne 0x411b5b
call fcn.004092c0
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov ecx, dword [esi + 4]
lea eax, [ecx*2 + 2]
push eax
lea eax, [esi + 0x10]
push eax
lea eax, [ecx*2 + 2]
push eax
lea eax, [edi + 0x10]
push eax
call fcn.0049ee68
add esp, 0x10
mov edx, dword [ebp - 0x14]
mov ebx, dword [ebp + 8]
lea eax, [edi + 0x10]
add edx, 0xfffffff0
or edi, 0xffffffff
mov dword [ebx], eax
mov byte [ebp - 4], 0
lea ecx, [edx + 0xc]
mov eax, edi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x411baf
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x411bca
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret