Function at 0x408580
Capabilities:
Encode data using xor

Disassembly:
push ebp
lea ebp, [esp - 0x7c]
sub esp, 0x7c
push 0xffffffffffffffff
push 0x460224
mov eax, dword fs:[0]
push eax
sub esp, 0x14
mov eax, dword [0x4780bc]
xor eax, ebp
mov dword [ebp + 0x78], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp + 0x18], 0
mov dword [ebp - 4], 0
mov dword [ebp + 0x28], 0
mov dword [ebp + 0x2c], 0xf
mov byte [ebp + 0x18], 0
push 4
mov byte [ebp - 4], 1
call fcn.0045e3f0
add esp, 4
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 2
test eax, eax
je 0x4085f5
mov ecx, eax
call fcn.00411aa0
push 0x1024
mov byte [ebp - 4], 1
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
push 0x1024
push 0
push eax
mov dword [ebp - 0x18], eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x10
mov byte [0x478784], 0
mov ecx, 0x478788
push 0
push 0x462c8f
call fcn.004038d0
mov dword [ebp + 0x60], 0xdac5c5ce
xor ecx, ecx
mov dword [ebp + 0x64], 0xc6c5d5ec
mov word [ebp + 0x68], 0x100
mov al, cl
sub al, 0x51
xor byte [ebp + ecx + 0x60], al
inc ecx
cmp ecx, 8
jb 0x408645
lea eax, [ebp - 0x11]
mov byte [ebp + 0x69], 0
push eax
lea eax, [ebp + 0x68]
push eax
lea eax, [ebp + 0x60]
push eax
lea ecx, [ebp + 0x40]
call fcn.004063e0
lea eax, [ebp + 0x40]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp]
push eax
call fcn.00412df0
add esp, 8
mov edx, eax
cmp dword [edx + 0x14], 0x10
mov byte [ebp - 4], 4
jb 0x40868d
mov edx, dword [edx]
mov dword [ebp + 0x6c], 0xdbc5d3ce
xor ecx, ecx
mov dword [ebp + 0x70], 0x100dadc
nop dword [eax]
mov al, cl
sub al, 0x51
xor byte [ebp + ecx + 0x6c], al
inc ecx
cmp ecx, 6
jb 0x4086a0
push edx
lea eax, [ebp + 0x6c]
mov byte [ebp + 0x73], 0
push eax
lea ecx, [ebp + 0x18]
call fcn.00410c50
mov ecx, dword [ebp + 0x14]
mov byte [ebp - 4], 3
cmp ecx, 0x10
jb 0x4086f3
mov edx, dword [ebp]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4086e9
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40872f
push ecx
push edx
call fcn.0045e420
add esp, 8
mov ecx, dword [ebp + 0x54]
mov dword [ebp + 0x10], 0
mov dword [ebp + 0x14], 0xf
mov byte [ebp], 0
mov byte [ebp - 4], 1
cmp ecx, 0x10
jb 0x40873f
mov edx, dword [ebp + 0x40]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x408735
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x408735
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0045e420
add esp, 8
lea eax, [ebp + 0x40]
push 0x47880c
push eax
call fcn.00412df0
add esp, 8
mov edx, eax
cmp dword [edx + 0x14], 0x10
mov byte [ebp - 4], 5
jb 0x40875e
mov edx, dword [edx]
mov dword [ebp + 0x6c], 0xdac5c5ce
xor ecx, ecx
mov dword [ebp + 0x70], 0xd1ddec
mov byte [ebp + 0x74], 1
mov al, cl
sub al, 0x51
xor byte [ebp + ecx + 0x6c], al
inc ecx
cmp ecx, 7
jb 0x408772
push edx
lea eax, [ebp + 0x6c]
mov byte [ebp + 0x74], 0
push eax
lea ecx, [ebp + 0x18]
call fcn.00410c50
mov ecx, dword [ebp + 0x54]
mov byte [ebp - 4], 1
cmp ecx, 0x10
jb 0x4087cb
mov edx, dword [ebp + 0x40]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4087c1
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4087c1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0045e420
add esp, 8
sub esp, 0x18
mov ecx, esp
push 0x4787f4
call fcn.00402850
lea eax, [ebp + 0x40]
push eax
lea ecx, [ebp - 0x19]
call fcn.00414a80
mov edx, eax
cmp dword [edx + 0x14], 0x10
mov byte [ebp - 4], 6
jb 0x4087f4
mov edx, dword [edx]
mov dword [ebp + 0x5c], 0xdac5c5ce
xor ecx, ecx
mov dword [ebp + 0x60], 0xdfc1dad6
mov dword [ebp + 0x64], 0xd3cdd9d4
mov dword [ebp + 0x68], 0x100d2d4
mov al, cl
sub al, 0x51
xor byte [ebp + ecx + 0x5c], al
inc ecx
cmp ecx, 0xe
jb 0x408812
push edx
lea eax, [ebp + 0x5c]
mov byte [ebp + 0x6b], 0
push eax
lea ecx, [ebp + 0x18]
call fcn.00410c50
mov ecx, dword [ebp + 0x54]
mov byte [ebp - 4], 1
cmp ecx, 0x10
jb 0x40886b
mov edx, dword [ebp + 0x40]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x408861
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x408861
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0045e420
add esp, 8
movaps xmm0, xmmword [0x462e00]
lea ecx, [ebp + 0x18]
movups xmmword [ebp + 0x34], xmm0
push 0
movaps xmm0, xmmword [0x462e40]
movups xmmword [ebp + 0x44], xmm0
mov word [ebp + 0x54], 0x100
call fcn.00410e10
sub esp, 0x18
mov esi, eax
mov edx, esp
mov dword [ebp + 0x70], esp
mov ecx, esi
mov dword [edx], 0
mov dword [edx + 0x10], 0
lea ebx, [ecx + 1]
mov dword [edx + 0x14], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4088b4
sub ecx, ebx
push ecx
push esi
mov ecx, edx
call fcn.004025b0
mov ebx, dword [ebp - 0x18]
push ebx
sub esp, 0x18
mov byte [ebp - 4], 7
mov edx, esp
mov dword [ebp - 0x18], edx
cmp byte [ebp + 0x55], 0
je 0x4088f2
xor ecx, ecx
nop
mov al, cl
sub al, 0x51
xor byte [ebp + ecx + 0x34], al
inc ecx
cmp ecx, 0x20
jb 0x4088e0
mov byte [ebp + 0x55], 0
lea eax, [ebp - 0x11]
mov ecx, edx
push eax
lea eax, [ebp + 0x54]
push eax
lea eax, [ebp + 0x34]
push eax
call fcn.004063e0
mov byte [ebp - 4], 1
call fcn.0040d760
movzx edx, byte [0x478785]
add esp, 0x38
test al, al
mov ecx, 1
cmove edx, ecx
mov byte [0x478785], dl
cmp dword [0x47885c], ecx
jne 0x408a20
cmp dword [0x47887c], 0xf1
jne 0x408a20
push 0x1024
movzx eax, dl
cmp ebx, 0x462cec
push 0
push dword [0x478858]
cmove eax, ecx
mov byte [0x478785], al
call sub.VCRUNTIME140.dll_memset
mov edx, dword [0x478858]
add esp, 0xc
mov ecx, ebx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx], al
lea edx, [edx + 1]
test al, al
jne 0x408972
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov ecx, edi
call fcn.00409210
mov ecx, dword [ebp + 0x2c]
cmp ecx, 0x10
jb 0x408a62
mov edx, dword [ebp + 0x18]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x408a58
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x408a58
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
movaps xmm0, xmmword [0x462e30]
xor ecx, ecx
movups xmmword [ebp + 0x30], xmm0
mov dword [ebp + 0x50], 0xfca39eef
movaps xmm0, xmmword [0x462d90]
movups xmmword [ebp + 0x40], xmm0
mov dword [ebp + 0x54], 0xe7bef3
mov byte [ebp + 0x58], 1
mov al, cl
sub al, 0x51
xor byte [ebp + ecx + 0x30], al
inc ecx
cmp ecx, 0x27
jb 0x4089f3
lea eax, [ebp + 0x30]
mov byte [ebp + 0x58], 0
push 5
push eax
call fcn.00411f80
add esp, 8
mov byte [0x478785], 1
mov eax, 0x408a62
ret
mov ecx, edi
call fcn.0040ae40
mov ecx, edi
call fcn.00408580
mov ecx, dword [ebp + 0x2c]
cmp ecx, 0x10
jb 0x408a62
mov edx, dword [ebp + 0x18]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x408a58
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4089c3
push ecx
push edx
call fcn.0045e420
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x78]
xor ecx, ebp
call fcn.0045e42e
lea esp, [ebp + 0x7c]
pop ebp
ret