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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45faa0
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.00410010
push 3
lea ecx, [ebp - 0x118]
lea esi, [ebp - 0x1f8]
mov dword [ebp - 4], ebx
call fcn.00406c30
push ebx
test eax, eax
jne 0x40f4ec
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 0x40f503
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 - 0x140], esi
call dword [sym.imp.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_]
mov edi, eax
add esp, 4
cmp edi, ebx
je 0x40f7c1
mov dword [edi], edi
mov dword [ebp - 0x144], 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 0x40f6ff
test byte [ebp + eax - 0x204], 1
jne 0x40f5eb
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.00407220
mov eax, dword [edi + 4]
add esp, 8
lea edx, [ebp - 0x134]
push edx
push eax
push edi
call fcn.00410250
mov ecx, 0x9249248
sub ecx, esi
cmp ecx, 1
jb 0x40f7b6
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 - 0x140], esi
je 0x40f580
lea eax, [ebp - 0x210]
push eax
call fcn.004100d0
mov ebx, dword [edi]
cmp ebx, edi
je 0x40f6ff
push 0x100
push 0
push 0x505dc8
call sub.MSVCR100.dll_memset
add esp, 0xc
xor eax, eax
jmp 0x40f620
mov cl, byte [eax + 0x477dd4]
xor cl, 0xb0
mov byte [eax + 0x505dc8], cl
inc eax
cmp eax, 0x32
jl 0x40f620
mov eax, 0x505dc8
lea esi, [ebx + 8]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40f640
sub eax, edx
push eax
push 0x505dc8
push esi
call fcn.00406b90
push 0x100
push 0
push 0x505dc8
call sub.MSVCR100.dll_memset
add esp, 0xc
xor eax, eax
jmp 0x40f670
mov dl, byte [eax + 0x478008]
xor dl, 0xb0
mov byte [eax + 0x505dc8], dl
inc eax
cmp eax, 0x32
jl 0x40f670
mov eax, 0x505dc8
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40f690
sub eax, edx
push eax
push 0x505dc8
push esi
call fcn.00406b90
push 0x100
push 0
push 0x505dc8
call sub.MSVCR100.dll_memset
add esp, 0xc
xor eax, eax
jmp 0x40f6c0
mov cl, byte [eax + 0x47803c]
xor cl, 0xb0
mov byte [eax + 0x505dc8], cl
inc eax
cmp eax, 0x32
jl 0x40f6c0
mov eax, 0x505dc8
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40f6e0
sub eax, edx
push eax
push 0x505dc8
push esi
call fcn.00406b90
mov ebx, dword [ebx]
cmp ebx, edi
jne 0x40f601
lea ebx, [ebp - 0x144]
call fcn.004101f0
mov edx, dword [ebp - 0x144]
mov esi, dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
push edx
call esi
add esp, 4
cmp dword [ebp - 0x120], 0x10
jb 0x40f731
mov eax, dword [ebp - 0x134]
push eax
call esi
add esp, 4
mov edx, dword [ebp - 0x210]
xor eax, eax
mov dword [ebp - 0x120], 0xf
mov dword [ebp - 0x124], eax
mov byte [ebp - 0x134], al
mov eax, dword [edx + 4]
lea ecx, [ebp - 0x1a0]
mov dword [ebp - 0x154], ecx
mov dword [ebp + eax - 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.00405fc0
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.004183ef
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 ecx, [ebp - 0x138]
push ecx
lea ecx, [ebp - 0x150]
mov dword [ebp - 0x138], ebx
call dword [sym.imp.MSVCR100.dll_public:_void___thiscall_std::exception::constructor_char_const__const_const__]
push 0x4712b8
lea edx, [ebp - 0x150]
push edx
mov dword [ebp - method.std::bad_alloc.virtual_0], vtable.std::bad_alloc.0
call sub.MSVCR100.dll__CxxThrowException
int3