Function at 0x1002c280
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x404
push ebx
push ebp
push esi
push edi
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x15]
mov byte [esp + 0x14], 0
rep stosd dword es:[edi], eax
mov ebx, dword [esp + 0x418]
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebx + 4]
test eax, eax
jne 0x1002c2b2
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
lea ecx, [esp + 0x14]
push 0x400
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov esi, dword [ebx + 4]
test esi, esi
mov ebp, dword [edx]
je 0x1002c326
mov al, byte [esi - 1]
test al, al
je 0x1002c326
cmp al, 0xff
je 0x1002c326
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_]
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
mov ecx, ebx
push edi
mov dword [esp + 0x18], edi
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 0x1002c326
mov ecx, edi
mov edi, dword [ebx + 4]
mov eax, ecx
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, eax
push ecx
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 eax, dword [ebx + 8]
cmp eax, ebp
jae 0x1002c32f
mov ebp, eax
test ebp, ebp
jbe 0x1002c365
mov ecx, dword [ebx + 4]
sub eax, ebp
push eax
lea edx, [ecx + ebp]
push edx
push ecx
call dword [sym.imp.MSVCRT.dll_memmove]
mov esi, dword [ebx + 8]
add esp, 0xc
sub esi, ebp
mov ecx, ebx
push 0
push esi
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 0x1002c365
mov eax, dword [ebx + 4]
mov dword [ebx + 8], esi
mov byte [esi + eax], 0
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov esi, ecx
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov edx, dword [ecx]
mov ecx, dword [ebx + 8]
sub edx, ecx
cmp edx, esi
ja 0x1002c38e
call edi
test esi, esi
jbe 0x1002c421
mov ebp, dword [ebx + 8]
add ebp, esi
cmp ebp, 0xfffffffd
jbe 0x1002c3a2
call edi
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x1002c3d1
mov al, byte [ecx - 1]
test al, al
je 0x1002c3d1
cmp al, 0xff
je 0x1002c3d1
test ebp, ebp
jne 0x1002c3f2
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
pop ebx
add esp, 0x404
ret
test ebp, ebp
jne 0x1002c3ed
test ecx, ecx
je 0x1002c421
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__::_Eos_unsigned_int_]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x404
ret
cmp dword [ebx + 0xc], ebp
jae 0x1002c3fb
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 + 8]
mov eax, dword [ebx + 4]
mov ecx, esi
add edi, eax
mov eax, ecx
lea esi, [esp + 0x14]
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, dword [ebx + 4]
mov dword [ebx + 8], ebp
mov byte [ecx + ebp], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x404
ret