Function at 0x408a80
Capabilities:
Encode data using xor
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4602ba
mov eax, dword fs:[0]
push eax
sub esp, 0xac
mov eax, dword [0x4780bc]
xor eax, ebp
mov dword [ebp - 0x14], 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 - 0xb4], edi
cmp dword [0x4787ec], 0
mov dword [ebp - 4], 0
jne 0x408b0f
movaps xmm0, xmmword [0x462d70]
xor ecx, ecx
movups xmmword [ebp - 0x48], xmm0
mov dword [ebp - 0x38], 0xf2f1f0c7
mov dword [ebp - 0x34], 0xf3a6a6
mov byte [ebp - 0x30], 1
mov al, cl
sub al, 0x51
xor byte [ebp + ecx - 0x48], al
inc ecx
cmp ecx, 0x17
jb 0x408ae8
lea eax, [ebp - 0x48]
mov byte [ebp - 0x30], 0
push 5
push eax
call fcn.00411f80
add esp, 8
mov byte [0x478785], 1
mov dword [ebp - 0x20], 0xc0d4c3da
xor ecx, ecx
mov dword [ebp - 0x1c], 0xd3d8d5dd
mov word [ebp - 0x18], 0x100
mov al, cl
sub al, 0x51
xor byte [ebp + ecx - 0x20], al
inc ecx
cmp ecx, 8
jb 0x408b25
lea eax, [ebp - 0x20]
mov byte [ebp - 0x17], 0
push eax
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov edx, eax
mov dword [ebp - 0xac], 0
mov ecx, edx
mov dword [ebp - 0x9c], 0
add esp, 4
mov dword [ebp - 0x98], 0
lea esi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408b70
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0xac]
call fcn.004025b0
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0xf
mov byte [ebp - 0x68], 0
push 4
mov byte [ebp - 4], 2
call fcn.0045e3f0
add esp, 4
mov dword [ebp - 0x28], eax
mov byte [ebp - 4], 3
test eax, eax
je 0x408bbf
mov ecx, eax
call fcn.00411aa0
push 0x1024
mov byte [ebp - 4], 2
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
push 0x1024
mov ebx, eax
push 0
push ebx
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 - 0x1c], 0xc6d0c2ed
xor ecx, ecx
mov dword [ebp - 0x18], 0x100d5c5
mov al, cl
sub al, 0x51
xor byte [ebp + ecx - 0x1c], al
inc ecx
cmp ecx, 6
jb 0x408c08
lea eax, [ebp - 0xae]
mov byte [ebp - 0x15], 0
push eax
lea eax, [ebp - 0x16]
push eax
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x48]
call fcn.004063e0
lea eax, [ebp - 0x48]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x84]
push eax
call fcn.00412df0
add esp, 8
mov edx, eax
cmp dword [edx + 0x14], 0x10
mov byte [ebp - 4], 5
jb 0x408c56
mov edx, dword [edx]
mov dword [ebp - 0x2c], 0xdbc5d3ce
xor ecx, ecx
mov dword [ebp - 0x28], 0x100dadc
mov al, cl
sub al, 0x51
xor byte [ebp + ecx - 0x2c], al
inc ecx
cmp ecx, 6
jb 0x408c66
push edx
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], 0
push eax
lea ecx, [ebp - 0x68]
call fcn.00410c50
mov ecx, dword [ebp - 0x70]
mov byte [ebp - 4], 4
cmp ecx, 0x10
jb 0x408cbc
mov edx, dword [ebp - 0x84]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x408cb2
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x408cfb
push ecx
push edx
call fcn.0045e420
add esp, 8
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x70], 0xf
mov byte [ebp - 0x84], 0
mov byte [ebp - 4], 2
cmp ecx, 0x10
jb 0x408d0b
mov edx, dword [ebp - 0x48]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x408d01
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x408d01
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 - 0x48]
push 0x47880c
push eax
call fcn.00412df0
add esp, 8
mov edx, eax
cmp dword [edx + 0x14], 0x10
mov byte [ebp - 4], 6
jb 0x408d2a
mov edx, dword [edx]
mov dword [ebp - 0x20], 0xdac5c5ce
xor ecx, ecx
mov dword [ebp - 0x1c], 0xd1ddec
mov byte [ebp - 0x18], 1
nop
mov al, cl
sub al, 0x51
xor byte [ebp + ecx - 0x20], al
inc ecx
cmp ecx, 7
jb 0x408d40
push edx
lea eax, [ebp - 0x20]
mov byte [ebp - 0x18], 0
push eax
lea ecx, [ebp - 0x68]
call fcn.00410c50
mov ecx, dword [ebp - 0x34]
mov byte [ebp - 4], 2
cmp ecx, 0x10
jb 0x408d99
mov edx, dword [ebp - 0x48]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x408d8f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x408d8f
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 - 0x48]
push eax
lea ecx, [ebp - 0xad]
call fcn.00414a80
mov edx, eax
cmp dword [edx + 0x14], 0x10
mov byte [ebp - 4], 7
jb 0x408dc5
mov edx, dword [edx]
mov dword [ebp - 0x24], 0xdac5c5ce
xor ecx, ecx
mov dword [ebp - 0x20], 0xdfc1dad6
mov dword [ebp - 0x1c], 0xd3cdd9d4
mov dword [ebp - 0x18], 0x100d2d4
mov al, cl
sub al, 0x51
xor byte [ebp + ecx - 0x24], al
inc ecx
cmp ecx, 0xe
jb 0x408de3
push edx
lea eax, [ebp - 0x24]
mov byte [ebp - 0x15], 0
push eax
lea ecx, [ebp - 0x68]
call fcn.00410c50
mov ecx, dword [ebp - 0x34]
mov byte [ebp - 4], 2
cmp ecx, 0x10
jb 0x408e3c
mov edx, dword [ebp - 0x48]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x408e32
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x408e32
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 edi
call fcn.00402850
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0xad]
call fcn.00414a80
mov edx, eax
cmp dword [edx + 0x14], 0x10
mov byte [ebp - 4], 8
jb 0x408e64
mov edx, dword [edx]
mov dword [ebp - 0x1c], 0xc6d0c2ed
xor ecx, ecx
mov dword [ebp - 0x18], 0x100d5c5
mov al, cl
sub al, 0x51
xor byte [ebp + ecx - 0x1c], al
inc ecx
cmp ecx, 6
jb 0x408e74
push edx
lea eax, [ebp - 0x1c]
mov byte [ebp - 0x15], 0
push eax
lea ecx, [ebp - 0x68]
call fcn.00410c50
mov ecx, dword [ebp - 0x34]
mov byte [ebp - 4], 2
cmp ecx, 0x10
jb 0x408ecd
mov edx, dword [ebp - 0x48]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x408ec3
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x408ec3
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 0x4787c4
call fcn.00402850
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0xad]
call fcn.00414a80
mov edx, eax
cmp dword [edx + 0x14], 0x10
mov byte [ebp - 4], 9
jb 0x408ef9
mov edx, dword [edx]
mov dword [ebp - 0x1c], 0xd7c2dfc3
xor ecx, ecx
mov word [ebp - 0x18], 0xc1
mov byte [ebp - 0x16], 1
nop dword [eax]
mov al, cl
sub al, 0x51
xor byte [ebp + ecx - 0x1c], al
inc ecx
cmp ecx, 5
jb 0x408f10
push edx
lea eax, [ebp - 0x1c]
mov byte [ebp - 0x16], 0
push eax
lea ecx, [ebp - 0x68]
call fcn.00410c50
mov ecx, dword [ebp - 0x34]
mov byte [ebp - 4], 2
cmp ecx, 0x10
jb 0x408f69
mov edx, dword [ebp - 0x48]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x408f5f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x408f5f
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
lea eax, [ebp - 0xac]
mov ecx, esp
push eax
call fcn.00402850
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0xad]
call fcn.00414a80
mov edx, eax
cmp dword [edx + 0x14], 0x10
mov byte [ebp - 4], 0xa
jb 0x408f97
mov edx, dword [edx]
mov dword [ebp - 0x1c], 0xc0d4c3c6
xor ecx, ecx
mov word [ebp - 0x18], 0x100
mov al, cl
sub al, 0x51
xor byte [ebp + ecx - 0x1c], al
inc ecx
cmp ecx, 4
jb 0x408fa6
push edx
lea eax, [ebp - 0x1c]
mov byte [ebp - 0x17], 0
push eax
lea ecx, [ebp - 0x68]
call fcn.00410c50
mov ecx, dword [ebp - 0x34]
mov byte [ebp - 4], 2
cmp ecx, 0x10
jb 0x408fff
mov edx, dword [ebp - 0x48]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x408ff5
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x408ff5
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 - 0x68]
movups xmmword [ebp - 0x50], xmm0
push 0
movaps xmm0, xmmword [0x462e40]
movups xmmword [ebp - 0x40], xmm0
mov word [ebp - 0x30], 0x100
call fcn.00410e10
sub esp, 0x18
mov esi, eax
mov edx, esp
mov dword [ebp - 0x28], esp
mov ecx, esi
mov dword [edx], 0
mov dword [edx + 0x10], 0
lea edi, [ecx + 1]
mov dword [edx + 0x14], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x409048
sub ecx, edi
push ecx
push esi
mov ecx, edx
call fcn.004025b0
push ebx
sub esp, 0x18
mov byte [ebp - 4], 0xb
mov edx, esp
mov dword [ebp - 0x18], edx
cmp byte [ebp - 0x2f], 0
je 0x409082
xor ecx, ecx
nop
mov al, cl
sub al, 0x51
xor byte [ebp + ecx - 0x50], al
inc ecx
cmp ecx, 0x20
jb 0x409070
mov byte [ebp - 0x2f], 0
lea eax, [ebp - 0xae]
mov ecx, edx
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.004063e0
mov byte [ebp - 4], 2
call fcn.0040d760
movzx ecx, byte [0x478785]
test al, al
mov edx, 1
cmove ecx, edx
cmp ebx, 0x462cec
push 0x1024
movzx eax, cl
push 0
push dword [0x478858]
cmove eax, edx
mov byte [0x478785], al
call sub.VCRUNTIME140.dll_memset
mov esi, dword [0x478858]
add esp, 0x44
mov edx, ebx
mov al, byte [edx]
lea edx, [edx + 1]
mov byte [esi], al
lea esi, [esi + 1]
test al, al
jne 0x4090e0
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ecx, dword [ebp - 0xb4]
add esp, 4
call fcn.00409210
mov ecx, dword [ebp - 0x54]
cmp ecx, 0x10
jb 0x409133
mov edx, dword [ebp - 0x68]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x409129
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409171
push ecx
push edx
call fcn.0045e420
add esp, 8
mov ecx, dword [ebp - 0x98]
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0xf
mov byte [ebp - 0x68], 0
cmp ecx, 0x10
jb 0x409181
mov edx, dword [ebp - 0xac]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x409177
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x409177
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
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0045e42e
mov esp, ebp
pop ebp
ret