Function at 0x408fe0
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x3fc
push ebx
mov ebx, ecx
mov al, 0x72
mov cl, 0x65
push ebp
mov byte [esp + 0xb], al
mov byte [esp + 0xd], al
push esi
mov byte [esp + 0xe], cl
mov byte [esp + 0x16], cl
lea eax, [esp + 0x18]
push edi
lea ecx, [esp + 0x24]
push eax
push ecx
mov byte [esp + 0x18], 0x75
mov byte [esp + 0x19], 0x73
mov byte [esp + 0x1c], 0x70
mov byte [esp + 0x1e], 0x6f
mov byte [esp + 0x1f], 0x66
mov byte [esp + 0x20], 0x69
mov byte [esp + 0x21], 0x6c
mov byte [esp + 0x23], 0
mov dword [esp + 0x24], 0x1f4
call dword [0x43bc04]
test eax, eax
jne 0x4091e3
lea edx, [esp + 0x10]
push edx
call dword [sym.imp.MSVCRT.dll_getenv]
add esp, 4
test eax, eax
je 0x40911b
push 0x5c
push eax
call dword [sym.imp.MSVCRT.dll_strrchr]
add esp, 8
test eax, eax
je 0x4090c2
lea esi, [eax + 1]
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
add ebx, 0x78
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
mov ecx, ebx
push ebp
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x4092ad
mov edi, dword [ebx + 4]
mov ecx, ebp
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 4]
mov dword [ebx + 8], ebp
pop edi
pop esi
mov byte [ecx + ebp], 0
pop ebp
pop ebx
add esp, 0x3fc
ret
mov edi, 0x438a68
or ecx, 0xffffffff
xor eax, eax
add ebx, 0x78
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov ebp, ecx
mov ecx, ebx
push ebp
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x4092ad
mov edi, dword [ebx + 4]
mov ecx, ebp
mov edx, ecx
mov esi, 0x438a68
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 4]
mov dword [ebx + 8], ebp
pop edi
pop esi
mov byte [eax + ebp], 0
pop ebp
mov eax, 1
pop ebx
add esp, 0x3fc
ret
mov edi, 0x438a68
or ecx, 0xffffffff
xor eax, eax
add ebx, 0x78
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::max_size_void_const]
cmp eax, ebp
jae 0x409141
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x409175
mov al, byte [ecx - 1]
test al, al
je 0x409175
cmp al, 0xff
je 0x409175
test ebp, ebp
jne 0x4091a9
dec al
push ebp
mov byte [ecx - 1], al
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x3fc
ret
test ebp, ebp
jne 0x409193
push 1
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x3fc
ret
mov eax, dword [ebx + 0xc]
cmp eax, 0x1f
ja 0x40919f
cmp eax, ebp
jae 0x4091b2
push 1
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push ebp
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Copy_unsigned_int_]
mov edi, dword [ebx + 4]
mov ecx, ebp
mov edx, ecx
mov esi, 0x438a68
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x3fc
ret
mov eax, dword [esp + 0x1c]
lea eax, [eax + eax*2]
push eax
call sub.MFC42.DLL_operatornew
mov esi, eax
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x28]
mov dword [esp + 0x24], esi
lea ecx, [eax + eax*2]
push ecx
push esi
push edx
call fcn.004109e0
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
add ebx, 0x78
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::max_size_void_const]
cmp eax, ebp
jae 0x40922f
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x409255
mov al, byte [ecx - 1]
test al, al
je 0x409255
cmp al, 0xff
je 0x409255
test ebp, ebp
jne 0x40927b
dec al
push ebp
mov byte [ecx - 1], al
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x4092a4
test ebp, ebp
jne 0x409265
push 1
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x4092a4
mov eax, dword [ebx + 0xc]
cmp eax, 0x1f
ja 0x409271
cmp eax, ebp
jae 0x409284
push 1
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push ebp
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Copy_unsigned_int_]
mov edi, dword [ebx + 4]
mov ecx, ebp
mov eax, ecx
push ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
mov esi, dword [esp + 0x20]
push esi
call sub.MFC42.DLL_operatordelete
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x3fc
ret