Function at 0x406290
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57f710
mov eax, dword fs:[0]
push eax
sub esp, 0x25c
mov eax, dword [0x60aca0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x268]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x250], eax
mov dword [ebp - 0x24c], 0
call fcn.00424180
mov ecx, ebx
mov dword [ebp - 4], 0
xor edi, edi
call fcn.00406260
push edi
push edi
push edi
push esi
lea ecx, [ebp - 0x268]
call fcn.00424200
test eax, eax
je 0x40630c
lea esi, [edi + 1]
jmp 0x406598
mov esi, dword [ebp - 0x260]
cmp dword [ebp - 0x250], edi
je 0x4063ee
push 0x6112a0
lea eax, [ebp - 0x118]
push 0x104
push eax
call fcn.004e2189
lea edx, [ebp - 0x118]
add esp, 0xc
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x406340
sub edx, ecx
xor ecx, ecx
test edx, edx
jle 0x406360
nop
mov al, cl
add al, 0x64
xor byte [ebp + ecx - 0x118], al
inc ecx
cmp ecx, edx
jl 0x406350
lea eax, [ebp - 0x118]
push eax
push dword [ebp - 0x250]
call fcn.0041bc00
mov edi, eax
add esp, 8
test edi, edi
jne 0x40638a
mov ecx, ebx
call fcn.00406260
lea esi, [edi + 2]
jmp 0x406598
lea eax, [ebp - 0x248]
push eax
push 0
push edi
call fcn.0041b9d0
add esp, 0xc
test eax, eax
je 0x4063e0
push edi
call fcn.0041ba30
add esp, 4
push edi
test al, al
je 0x4063c7
call fcn.0041afc0
add esp, 4
mov ecx, ebx
call fcn.00406260
mov esi, 3
jmp 0x406598
call fcn.00420a70
add esp, 4
mov ecx, ebx
call fcn.00406260
mov esi, 3
jmp 0x406598
mov eax, dword [ebp - 0x120]
mov dword [ebp - 0x24c], eax
jmp 0x4063f0
xor eax, eax
add eax, 3
add eax, esi
push eax
call fcn.004e21fe
mov ecx, eax
add esp, 4
mov dword [ebx], ecx
test ecx, ecx
jne 0x40644a
test edi, edi
je 0x406439
push edi
call fcn.0041ba30
add esp, 4
push edi
test al, al
je 0x406431
call fcn.0041afc0
add esp, 4
mov ecx, ebx
call fcn.00406260
mov esi, 4
jmp 0x406598
call fcn.00420a70
add esp, 4
mov ecx, ebx
call fcn.00406260
mov esi, 4
jmp 0x406598
mov eax, esi
cdq
push edx
push eax
push ecx
lea ecx, [ebp - 0x268]
call fcn.00424330
test eax, eax
je 0x4064a3
test edi, edi
je 0x406492
push edi
call fcn.0041ba30
add esp, 4
push edi
test al, al
je 0x40648a
call fcn.0041afc0
add esp, 4
mov ecx, ebx
call fcn.00406260
mov esi, 5
jmp 0x406598
call fcn.00420a70
add esp, 4
mov ecx, ebx
call fcn.00406260
mov esi, 5
jmp 0x406598
cmp dword [ebp - 0x250], 0
je 0x406527
mov eax, dword [ebx]
push dword [ebp - 0x24c]
mov byte [esi + eax], 0xd
mov eax, dword [ebx]
mov byte [esi + eax + 1], 0xa
add esi, 2
mov eax, dword [ebx]
add eax, esi
push eax
push 0
push edi
call fcn.0041c2c0
add esp, 0x10
test eax, eax
je 0x406521
cmp eax, 0x600
je 0x406521
test edi, edi
je 0x406510
push edi
call fcn.0041ba30
add esp, 4
push edi
test al, al
je 0x406508
call fcn.0041afc0
add esp, 4
mov ecx, ebx
call fcn.00406260
mov esi, 6
jmp 0x406598
call fcn.00420a70
add esp, 4
mov ecx, ebx
call fcn.00406260
mov esi, 6
jmp 0x406598
add esi, dword [ebp - 0x24c]
mov eax, dword [ebx]
mov byte [esi + eax], 0
mov esi, dword [ebx]
cmp byte [esi], 0
je 0x406575
mov al, byte [esi]
cmp al, 0xd
je 0x40653e
cmp al, 0xa
jne 0x406544
mov byte [esi], 0
inc esi
jmp 0x406534
test al, al
je 0x406575
mov dword [ebp - 0x24c], esi
nop
cmp al, 0xa
je 0x406560
test al, al
je 0x406560
mov al, byte [esi + 1]
inc esi
cmp al, 0xd
jne 0x406550
push ecx
lea eax, [ebp - 0x24c]
push eax
lea ecx, [ebx + 4]
call fcn.00407850
cmp byte [esi], 0
jne 0x406534
test edi, edi
je 0x406596
push edi
call fcn.0041ba30
add esp, 4
push edi
test al, al
je 0x40658e
call fcn.0041afc0
jmp 0x406593
call fcn.00420a70
add esp, 4
xor esi, esi
lea ecx, [ebp - 0x268]
call fcn.004241b0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004dcc5c
mov esp, ebp
pop ebp
ret 8