Function at 0x402410
Capabilities:
Query environment variable

Disassembly:
push 0xffffffffffffffff
push 0x4a7328
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push esi
push edi
lea ecx, [esp + 0xc]
call sub.MFC42u.DLL_CString::CString_5
mov eax, dword [0x545da8]
mov dword [esp + 0x20], 0
test eax, eax
jne 0x4026e8
mov edi, dword [0x545da0]
mov esi, dword [0x545d9c]
mov ebx, edi
mov dword [0x545da8], 1
cmp edi, ebx
je 0x40247d
push edi
mov ecx, esi
call sub.MFC42u.DLL_CString::operator_1
add edi, 4
add esi, 4
cmp edi, ebx
jne 0x402465
mov edi, dword [0x545da0]
cmp esi, edi
mov ebx, esi
je 0x402491
mov ecx, ebx
call sub.MFC42u.DLL_CString::CString
add ebx, 4
cmp ebx, edi
jne 0x402483
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [esp + 0x14]
push 2
push eax
push 0x4cb22c
mov dword [0x545da0], esi
call edi
test eax, eax
je 0x4026e8
lea esi, [eax + 0x10]
cmp esi, eax
jbe 0x4026e8
lea ecx, [esi + esi]
push ecx
call dword [sym.imp.MSVCRT.dll_malloc]
mov ebx, eax
add esp, 4
test ebx, ebx
mov dword [esp + 0x10], ebx
je 0x4026e8
push esi
push ebx
push 0x4cb22c
call edi
test eax, eax
je 0x4026de
push 0x4cb228
push ebx
call dword [sym.imp.MSVCRT.dll_wcstok]
add esp, 8
test eax, eax
je 0x4026de
push ebp
push eax
lea edx, [esp + 0x14]
push 0x4cb1f8
push edx
call sub.MFC42u.DLL_CString::Format
add esp, 0xc
lea ecx, [esp + 0x10]
push 0x20
call sub.MFC42u.DLL_CString::TrimLeft
push 0x20
lea ecx, [esp + 0x14]
call sub.MFC42u.DLL_CString::TrimRight_1
push 0x4cb224
lea ecx, [esp + 0x14]
call sub.MFC42u.DLL_CString::TrimRight
push 0x4cb220
lea ecx, [esp + 0x14]
call sub.MFC42u.DLL_CString::TrimRight
mov eax, dword [0x545da0]
mov ecx, dword [0x545da4]
sub ecx, eax
mov esi, eax
sar ecx, 2
cmp ecx, 1
jae 0x402635
mov ecx, dword [0x545d9c]
test ecx, ecx
je 0x402581
mov edx, eax
sub edx, ecx
sar edx, 2
cmp edx, 1
jbe 0x402581
sub eax, ecx
sar eax, 2
mov edi, eax
jmp 0x402586
mov edi, 1
mov ecx, 0x545d98
call fcn.00402820
mov ebp, eax
add ebp, edi
mov eax, ebp
jns 0x40259a
xor eax, eax
shl eax, 2
push eax
call sub.MFC42u.DLL_operatornew
mov ecx, dword [0x545d9c]
add esp, 4
mov edi, eax
push edi
push esi
push ecx
mov ecx, 0x545d98
call fcn.00402840
lea edx, [esp + 0x10]
mov ebx, eax
push edx
push 1
push ebx
mov ecx, 0x545d98
call fcn.00402880
mov eax, dword [0x545da0]
add ebx, 4
push ebx
push eax
push esi
mov ecx, 0x545d98
call fcn.00402840
mov ecx, dword [0x545da0]
mov edx, dword [0x545d9c]
push ecx
push edx
mov ecx, 0x545d98
call fcn.004027f0
mov eax, dword [0x545d9c]
push eax
call sub.MFC42u.DLL_operatordelete
lea eax, [edi + ebp*4]
add esp, 4
mov ecx, 0x545d98
mov dword [0x545da4], eax
call fcn.00402820
mov ebx, dword [esp + 0x14]
lea ecx, [edi + eax*4 + 4]
mov dword [0x545da0], ecx
mov dword [0x545d9c], edi
jmp 0x4026c5
mov edx, eax
sub edx, esi
sar edx, 2
cmp edx, 1
jae 0x40268c
lea ecx, [esi + 4]
push ecx
push eax
push esi
mov ecx, 0x545d98
call fcn.00402840
mov eax, dword [0x545da0]
lea edx, [esp + 0x10]
mov ecx, eax
push edx
sub ecx, esi
mov edx, 1
sar ecx, 2
sub edx, ecx
mov ecx, 0x545d98
push edx
push eax
call fcn.00402880
mov ecx, dword [0x545da0]
lea eax, [esp + 0x10]
push eax
push ecx
push esi
call fcn.004028b0
add esp, 0xc
jmp 0x4026be
push eax
push eax
add eax, 0xfffffffc
mov ecx, 0x545d98
push eax
call fcn.00402840
mov eax, dword [0x545da0]
push eax
add eax, 0xfffffffc
push eax
push esi
call fcn.004028e0
lea edx, [esp + 0x1c]
lea eax, [esi + 4]
push edx
push eax
push esi
call fcn.004028b0
add esp, 0x18
add dword [0x545da0], 4
push 0x4cb228
push 0
call dword [sym.imp.MSVCRT.dll_wcstok]
add esp, 8
test eax, eax
jne 0x402502
pop ebp
push ebx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
lea ecx, [esp + 0xc]
mov dword [esp + 0x20], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov ecx, dword [esp + 0x18]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x18
ret