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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4603b0
mov eax, dword fs:[0]
push eax
sub esp, 0x204
mov eax, dword [0x476018]
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
push 0x103
xor ebx, ebx
lea eax, [ebp - 0x117]
push ebx
push eax
mov esi, ecx
mov byte [ebp - 0x118], 0
call sub.MSVCR100.dll_memset
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x118]
push ecx
push str.WINDIR
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push esi
lea edx, [ebp - 0x118]
push 0x104
push edx
call dword [sym.imp.MSVCR100.dll_strcat_s]
add esp, 0xc
lea eax, [ebp - 0x210]
push eax
call fcn.00410b60
push 3
lea ecx, [ebp - 0x118]
lea esi, [ebp - 0x1f8]
mov dword [ebp - 4], ebx
call fcn.00407430
push ebx
test eax, eax
jne 0x40fffc
mov ecx, dword [ebp - 0x210]
mov ecx, dword [ecx + 4]
push 2
lea ecx, [ebp + ecx - 0x210]
call dword [sym.imp.MSVCP100.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
jmp 0x410013
mov edx, dword [ebp - 0x210]
mov ecx, dword [edx + 4]
push ebx
lea ecx, [ebp + ecx - 0x210]
call dword [sym.imp.MSVCP100.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool_]
mov dword [ebp - 0x120], 0xf
mov dword [ebp - 0x124], ebx
mov byte [ebp - 0x134], 0
mov byte [ebp - 4], 1
xor esi, esi
push 0x24
mov dword [ebp - 0x148], esi
call dword [sym.imp.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_]
mov edi, eax
add esp, 4
cmp edi, ebx
je 0x410307
mov dword [edi], edi
mov dword [ebp - 0x14c], edi
mov dword [edi + 4], edi
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x210]
mov eax, dword [eax + 4]
mov edx, dword [ebp + eax - 0x204]
lea ecx, [ebp + eax - 0x210]
and dl, 6
movsx edx, dl
neg edx
sbb edx, edx
not edx
test ecx, edx
je 0x410117
test byte [ebp + eax - 0x204], 1
jne 0x4100fb
nop
push 0xa
lea ecx, [ebp + eax - 0x210]
call dword [sym.imp.MSVCP100.dll_public:_char___thiscall_std::basic_ios_char__struct_std::char_traits_char__::widen_char_const]
movzx eax, al
push eax
lea ecx, [ebp - 0x210]
push ecx
lea ecx, [ebp - 0x134]
call fcn.00407cc0
mov eax, dword [edi + 4]
add esp, 8
lea edx, [ebp - 0x134]
push edx
push eax
push edi
call fcn.00410da0
mov ecx, 0x9249248
sub ecx, esi
cmp ecx, 1
jb 0x4101ce
mov dword [edi + 4], eax
mov ecx, dword [eax + 4]
mov dword [ecx], eax
mov edx, dword [ebp - 0x210]
mov eax, dword [edx + 4]
inc esi
test byte [ebp + eax - 0x204], 1
mov dword [ebp - 0x148], esi
je 0x410090
lea eax, [ebp - 0x210]
push eax
call fcn.00410c20
mov esi, dword [edi]
mov dword [ebp - 0x138], esi
cmp esi, edi
jne 0x4101e6
lea ebx, [ebp - 0x14c]
call fcn.00410d40
mov eax, dword [ebp - 0x14c]
mov esi, dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
push eax
call esi
add esp, 4
cmp dword [ebp - 0x120], 0x10
jb 0x410149
mov ecx, dword [ebp - 0x134]
push ecx
call esi
add esp, 4
xor eax, eax
mov dword [ebp - 0x124], eax
mov byte [ebp - 0x134], al
mov eax, dword [ebp - 0x210]
mov dword [ebp - 0x120], 0xf
mov ecx, dword [eax + 4]
lea edx, [ebp - 0x1a0]
mov dword [ebp - 0x13c], edx
mov dword [ebp + ecx - method.std::basic_fstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_fstream_char__struct_std::char_traits_char__.0
lea ecx, [ebp - 0x1f8]
mov dword [ebp - 4], 3
call fcn.004066e0
lea ecx, [ebp - 0x1f8]
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.MSVCP100.dll_public_virtual:_void___thiscall_std::basic_iostream_char__struct_std::char_traits_char__::destructor_void_]
lea ecx, [ebp - 0x1a0]
call dword [sym.imp.MSVCP100.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
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.00418a8f
mov esp, ebp
pop ebp
ret
push str.list_T__too_long
call dword [sym.imp.MSVCP100.dll_void___cdecl_std::_Xlength_error_char_const__]
lea esp, [esp]
mov esi, dword [ebp - 0x138]
push 0x100
push 0
push 0x505dc8
call sub.MSVCR100.dll_memset
add esp, 0xc
xor eax, eax
lea esp, [esp]
mov cl, byte [eax + 0x477dd4]
xor cl, 0xb0
mov byte [eax + 0x505dc8], cl
inc eax
cmp eax, 0x32
jl 0x410200
mov eax, 0x505dc8
add esi, 8
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x410220
sub eax, edx
push eax
push 0x505dc8
push esi
call fcn.004072b0
push 0x100
push 0
push 0x505dc8
mov dword [ebp - 0x13c], eax
call sub.MSVCR100.dll_memset
add esp, 0xc
xor eax, eax
mov dl, byte [eax + 0x478008]
xor dl, 0xb0
mov byte [eax + 0x505dc8], dl
inc eax
cmp eax, 0x32
jl 0x410251
mov eax, 0x505dc8
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x410270
sub eax, edx
push eax
push 0x505dc8
push esi
call fcn.004072b0
push 0x100
push 0
push 0x505dc8
mov ebx, eax
call sub.MSVCR100.dll_memset
add esp, 0xc
xor eax, eax
lea ecx, [ecx]
mov cl, byte [eax + 0x47803c]
xor cl, 0xb0
mov byte [eax + 0x505dc8], cl
inc eax
cmp eax, 0x32
jl 0x4102a0
mov eax, 0x505dc8
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4102c0
sub eax, edx
push eax
push 0x505dc8
push esi
call fcn.004072b0
cmp dword [ebp - 0x13c], 0xffffffff
jne 0x410302
cmp ebx, 0xffffffff
jne 0x410302
cmp eax, ebx
jne 0x410302
mov edx, dword [ebp - 0x138]
mov eax, dword [edx]
mov dword [ebp - 0x138], eax
cmp eax, edi
jne 0x4101e0
jmp 0x410117
call fcn.00410b10
lea edx, [ebp - 0x140]
push edx
lea ecx, [ebp - 0x158]
mov dword [ebp - 0x140], ebx
call dword [sym.imp.MSVCR100.dll_public:_void___thiscall_std::exception::constructor_char_const__const_const__]
push 0x471350
lea eax, [ebp - 0x158]
push eax
mov dword [ebp - method.std::bad_alloc.virtual_0], vtable.std::bad_alloc.0
call sub.MSVCR100.dll__CxxThrowException
int3