Function at 0x435860
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 [0x467230]
test eax, eax
jne 0x435a63
lea edx, [esp + 0x10]
push edx
call dword [sym.imp.MSVCRT.dll_getenv]
add esp, 4
test eax, eax
je 0x43599b
push 0x5c
push eax
call dword [sym.imp.MSVCRT.dll_strrchr]
add esp, 8
test eax, eax
je 0x435942
lea esi, [eax + 1]
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
add ebx, 0x24
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 0x435b2d
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, 0x4660f4
or ecx, 0xffffffff
xor eax, eax
add ebx, 0x24
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 0x435b2d
mov edi, dword [ebx + 4]
mov ecx, ebp
mov edx, ecx
mov esi, 0x4660f4
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, 0x4660f4
or ecx, 0xffffffff
xor eax, eax
add ebx, 0x24
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 0x4359c1
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x4359f5
mov al, byte [ecx - 1]
test al, al
je 0x4359f5
cmp al, 0xff
je 0x4359f5
test ebp, ebp
jne 0x435a29
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 0x435a13
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 0x435a1f
cmp eax, ebp
jae 0x435a32
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, 0x4660f4
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.00408f30
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
add ebx, 0x24
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 0x435aaf
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x435ad5
mov al, byte [ecx - 1]
test al, al
je 0x435ad5
cmp al, 0xff
je 0x435ad5
test ebp, ebp
jne 0x435afb
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 0x435b24
test ebp, ebp
jne 0x435ae5
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 0x435b24
mov eax, dword [ebx + 0xc]
cmp eax, 0x1f
ja 0x435af1
cmp eax, ebp
jae 0x435b04
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