Function at 0x410740
Capabilities:
Encode data using xor

Disassembly:
push 0xffffffffffffffff
push 0x484aa8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x138
push ebx
push ebp
push esi
push edi
mov eax, dword [esp + 0x190]
mov dword [esp + 0x150], 2
lea ebx, [eax + 0x44]
push ebx
call fcn.00465044
mov esi, dword [esp + 0x19c]
add esp, 4
test esi, esi
mov ebp, eax
je 0x4107d3
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov eax, ecx
cmp eax, 0x20
jge 0x4107cc
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x20
lea edi, [eax + ebp]
sub ecx, eax
mov esi, 0x497528
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x4107e1
mov ecx, 8
jmp 0x4107dd
mov ecx, 8
mov esi, 0x497528
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x168]
test esi, esi
je 0x410823
mov al, byte [esi - 1]
test al, al
je 0x410814
cmp al, 0xff
je 0x410814
mov ecx, dword [esp + 0x16c]
push 0
push ecx
lea ecx, [esp + 0x16c]
call fcn.00404220
mov esi, dword [esp + 0x168]
test esi, esi
je 0x410823
mov byte [esi - 1], 0xff
mov esi, dword [esp + 0x168]
mov eax, dword [esp + 0x184]
lea edi, [ebp + 0x20]
mov ecx, 8
mov edx, eax
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x18c]
mov ecx, eax
mov byte [ebp + 0x40], al
sar edx, 8
sar ecx, 0x10
sar eax, 0x18
test esi, esi
mov byte [ebp + 0x41], dl
mov byte [ebp + 0x42], cl
mov byte [ebp + 0x43], al
jne 0x41085d
mov esi, 0x488b98
mov ecx, dword [esp + 0x190]
lea edi, [ebp + 0x44]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x19c]
push esi
push ebx
push ebp
call fcn.00410e20
mov eax, dword [esp + 0x168]
add esp, 0xc
cmp eax, 3
jne 0x410908
mov ebx, dword [esp + 0x160]
mov edi, 0x32
push esi
push ebx
push esi
call fcn.00410e20
add esp, 0xc
dec edi
jne 0x41089f
mov esi, dword [esp + 0x178]
test esi, esi
je 0x4108ef
mov al, byte [esi - 1]
test al, al
je 0x4108e0
cmp al, 0xff
je 0x4108e0
mov eax, dword [esp + 0x17c]
push 0
push eax
lea ecx, [esp + 0x17c]
call fcn.00404220
mov esi, dword [esp + 0x178]
test esi, esi
je 0x4108ef
mov byte [esi - 1], 0xff
mov esi, dword [esp + 0x178]
mov ecx, 8
lea edi, [esp + 0x18]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x13
mov dword [esp + 0x14], ecx
jmp 0x4109ca
cmp eax, 2
jne 0x410a9b
mov ecx, dword [esp + 0x160]
lea eax, [esp + 0x48]
push eax
push ecx
push esi
call fcn.0042b530
add esp, 0xc
xor ebx, ebx
mov byte [esp + 0x12], 0
mov byte [esp + 0x13], 0
xor esi, esi
mov edx, dword [esp + 0x17c]
cmp edx, esi
jb 0x41097f
mov eax, dword [esp + 0x178]
cmp eax, ebx
je 0x41097f
mov cl, byte [eax - 1]
test cl, cl
je 0x41096c
cmp cl, 0xff
je 0x41096c
push ebx
push edx
lea ecx, [esp + 0x17c]
call fcn.00404220
mov eax, dword [esp + 0x178]
cmp eax, ebx
je 0x41097b
mov byte [eax - 1], 0xff
mov eax, dword [esp + 0x178]
add eax, esi
jmp 0x410984
mov eax, 0x488b98
mov dl, byte [eax]
lea eax, [esp + 0x12]
push edx
lea ecx, [esp + 0x17]
push eax
lea edx, [esp + 0x50]
push ecx
push edx
call fcn.00410d80
add esp, 0x10
mov byte [esp + esi + 0x18], al
inc esi
cmp esi, 0x20
jl 0x410935
mov ecx, 8
mov edi, 0x497528
lea esi, [esp + 0x18]
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
mov edx, eax
sete dl
mov esi, edx
jmp 0x410a9f
mov ecx, dword [esp + 0x14]
xor eax, eax
test ebx, ebx
jle 0x4109ed
mov edi, dword [esp + 0x19c]
lea edx, [esp + 0x38]
sub edi, edx
lea esi, [esp + eax + 0x38]
mov dl, byte [edi + esi]
xor dl, cl
inc eax
cmp eax, ebx
mov byte [esi], dl
jl 0x4109dd
lea eax, [esp + 0x48]
lea ecx, [esp + 0x38]
push eax
push ebx
push ecx
call fcn.0042b530
add esp, 0xc
mov byte [esp + 0x12], 0
mov byte [esp + 0x13], 0
xor esi, esi
mov dl, byte [esp + esi + 0x18]
lea eax, [esp + 0x12]
push edx
lea ecx, [esp + 0x17]
push eax
lea edx, [esp + 0x50]
push ecx
push edx
call fcn.00410d80
add esp, 0x10
mov byte [esp + esi + 0x18], al
inc esi
cmp esi, 0x20
jl 0x410a0c
mov eax, dword [esp + 0x14]
dec eax
mov dword [esp + 0x14], eax
jns 0x4109c6
mov ecx, 8
mov esi, 0x497528
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x18c]
test esi, esi
jne 0x410a5b
mov esi, 0x488b98
mov eax, dword [esp + 0x190]
lea edi, [ebp + 0x20]
mov ecx, eax
add eax, 0x20
mov edx, ecx
push ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push eax
and ecx, 3
push ebp
rep movsb byte es:[edi], byte [esi]
call fcn.00410e20
add esp, 0xc
mov ecx, 4
mov edi, ebp
lea esi, [esp + 0x18]
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
mov edx, eax
sete dl
mov esi, edx
jmp 0x410a9d
xor esi, esi
xor ebx, ebx
push ebp
call fcn.00464f5b
mov ecx, dword [esp + 0x16c]
add esp, 4
cmp ecx, ebx
je 0x410acf
mov al, byte [ecx - 1]
test al, al
je 0x410ac5
cmp al, 0xff
je 0x410ac5
dec al
mov byte [ecx - 1], al
jmp 0x410acf
dec ecx
push ecx
call fcn.0047c305
add esp, 4
mov ecx, dword [esp + 0x178]
mov dword [esp + 0x168], ebx
cmp ecx, ebx
mov dword [esp + 0x16c], ebx
mov dword [esp + 0x170], ebx
je 0x410b0b
mov al, byte [ecx - 1]
test al, al
je 0x410b01
cmp al, 0xff
je 0x410b01
dec al
mov byte [ecx - 1], al
jmp 0x410b0b
dec ecx
push ecx
call fcn.0047c305
add esp, 4
mov ecx, dword [esp + 0x18c]
mov dword [esp + 0x178], ebx
cmp ecx, ebx
mov dword [esp + 0x17c], ebx
mov dword [esp + 0x180], ebx
je 0x410b47
mov al, byte [ecx - 1]
test al, al
je 0x410b3d
cmp al, 0xff
je 0x410b3d
dec al
mov byte [ecx - 1], al
jmp 0x410b47
dec ecx
push ecx
call fcn.0047c305
add esp, 4
mov ecx, dword [esp + 0x148]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x144
ret