Function at 0x1048b45
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x10bf0c3
call fcn.0106f6c0
sub esp, 0x640
push ebx
push esi
mov esi, ecx
xor eax, eax
cmp dword [esi + 0x74], eax
push edi
je 0x104943f
or byte [ebp - 0x28], 0xff
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], eax
call fcn.010207aa
push dword [esi + 0x74]
mov edi, dword [sym.imp.msvcrt.dll_wcslen]
mov dword [ebp - 0x18], eax
call edi
mov ebx, dword [sym.imp.msvcrt.dll_malloc]
lea eax, [eax + eax + 2]
push eax
call ebx
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x14], eax
je 0x1048def
push dword [esi + 0x74]
call edi
lea eax, [eax + eax + 2]
push eax
call ebx
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x1c], eax
jne 0x1048bc8
push dword [ebp - 0x14]
call dword [sym.imp.msvcrt.dll_free]
jmp 0x1048dee
push dword [esi + 0x74]
mov ecx, esi
call fcn.010482ff
sub eax, 0
je 0x1049450
dec eax
dec eax
je 0x104942d
push dword [esi + 0x74]
push dword [ebp - 0x14]
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
push 0x20
pop ebx
push ebx
lea eax, [ebp - 0xfc]
push eax
push 0x1770
call fcn.01061a93
push ebx
lea eax, [ebp - 0xbc]
push eax
push 0x1771
call fcn.01061a93
push ebx
lea eax, [ebp - 0x13c]
push eax
push 0x1772
call fcn.01061a93
push ebx
lea eax, [ebp - 0x7c]
push eax
push 0x1774
call fcn.01061a93
push ebx
lea eax, [ebp - 0x17c]
push eax
push 0x17d5
call fcn.01061a93
lea eax, [ebp - 0x7c]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.msvcrt.dll_wcstok]
mov ebx, eax
test ebx, ebx
pop ecx
pop ecx
mov dword [ebp - 0x10], ebx
je 0x104942d
call fcn.01059c1a
test eax, eax
mov dword [ebp - 0x30], eax
je 0x10493e9
push ebx
call edi
push eax
lea eax, [ebp - 0xfc]
push eax
push ebx
mov ebx, dword [sym.imp.msvcrt.dll__wcsnicmp]
call ebx
add esp, 0x10
test eax, eax
je 0x1048cf8
push dword [ebp - 0x10]
call edi
push eax
lea eax, [ebp - 0x13c]
push eax
push dword [ebp - 0x10]
call ebx
add esp, 0x10
test eax, eax
je 0x1048cf8
push dword [ebp - 0x10]
call edi
push eax
push 0x1009a98
push dword [ebp - 0x10]
call ebx
add esp, 0x10
test eax, eax
je 0x1048cf8
push dword [ebp - 0x10]
call edi
push eax
lea eax, [ebp - 0x17c]
push eax
push dword [ebp - 0x10]
call ebx
add esp, 0x10
test eax, eax
je 0x1048cf8
push dword [ebp - 0x10]
call edi
push eax
lea eax, [ebp - 0xbc]
push eax
push dword [ebp - 0x10]
call ebx
add esp, 0x10
test eax, eax
jne 0x10493e9
mov ecx, esi
call sub.MFC42u.DLL_CCmdTarget::EndWaitCursor
and dword [ebp - 0x3c], 0
jmp 0x1048d0b
push eax
call fcn.0107a296
mov eax, dword [0x10d3570]
mov eax, dword [eax + 4]
test eax, eax
jne 0x1048d05
push dword [ebp - 0x10]
call edi
push eax
lea eax, [ebp - 0x17c]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
xor ebx, ebx
add esp, 0x10
inc ebx
test eax, eax
jne 0x1048d58
mov eax, dword [esi + 0x20]
mov ecx, dword [eax + 0xd4]
push ebx
call fcn.01039fc9
mov ecx, esi
call fcn.01052dda
mov dword [eax + 0x5c], ebx
mov dword [ebp - 0x34], ebx
jmp 0x1048fe2
push dword [ebp - 0x10]
call edi
push eax
lea eax, [ebp - 0x13c]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0x10
test eax, eax
jne 0x1048f71
mov eax, dword [esi + 0x20]
mov ecx, dword [eax + 0xd4]
push 2
call fcn.01039fc9
push 0x104
lea eax, [ebp - 0x64c]
push eax
push 0x1009b34
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [ebp - 0x64c]
push eax
lea eax, [ebp - 0x444]
push 0x1009b10
push eax
call dword [sym.imp.msvcrt.dll_swprintf]
add esp, 0xc
push 0x10d3590
lea eax, [ebp - 0x444]
push eax
call fcn.01037596
test ax, ax
je 0x1048df7
lea eax, [ebp - 0x444]
push eax
push 0xe15
call fcn.01077db1
pop ecx
mov dword [esi + 0x110], 0x57
pop ecx
xor eax, eax
inc eax
jmp 0x1049441
mov eax, dword [0x10d3590]
test eax, eax
mov dword [ebp - 0x38], ebx
je 0x1048eb8
cmp word [eax + 0x1c], 0
je 0x1048e9b
mov ecx, esi
call fcn.01052dda
test eax, eax
mov dword [ebp - 0x24], eax
jne 0x1048e41
push 0xe27
mov dword [esi + 0x110], 0x57
call fcn.0107e7cd
pop ecx
push eax
push ebx
call fcn.0105c2f4
jmp 0x1049429
mov eax, dword [ebp - 0x24]
mov dword [eax + 0x7c], ebx
mov eax, dword [ebp - 0x18]
push 0
mov dword [eax + 0x2ac], ebx
call fcn.0106fb41
mov eax, dword [0x10d3590]
push 0x104
push dword [eax + 0x14]
mov eax, dword [ebp - 0x18]
add eax, 0xa2
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy]
mov eax, dword [ebp - 0x18]
add esp, 0xc
mov word [eax + 0xb84], bx
call fcn.01049e59
mov word [eax + 0x3c], bx
mov eax, dword [0x10d3590]
push dword [eax + 0x14]
push dword [ebp - 0x24]
call fcn.0101e5be
jmp 0x1048eb8
call fcn.01049e59
and word [eax + 0x3c], 0
mov word [eax + 0x3e], bx
mov eax, dword [ebp - 0x18]
mov word [eax + 0xb84], bx
call fcn.0104adb1
mov ecx, esi
call fcn.01056e07
test eax, eax
je 0x1048f5c
and dword [ebp - 0x10], 0
mov ecx, esi
call fcn.01052dda
push ebx
mov ecx, eax
mov dword [ebp - 0x24], eax
mov dword [eax + 0x5c], ebx
call fcn.01028eed
mov eax, dword [ebp - 0x24]
mov dword [eax + 0x14], ebx
mov eax, dword [ebp - 0x18]
and word [eax + 0xad6], 0
push 2
mov ecx, esi
call fcn.01055704
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x6c]
cmp eax, ebx
jne 0x1048f09
mov dword [ebp - 0x10], ebx
jmp 0x1048f13
push 2
pop ecx
cmp eax, ecx
jne 0x1048f13
mov dword [ebp - 0x10], ecx
push dword [ebp - 0x10]
push dword [0x10d3578]
push dword [0x10d356c]
push dword [0x10d3574]
push dword [0x10d3590]
call fcn.01037be3
test ax, ax
jne 0x1048f4d
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x20], ebx
mov dword [eax + 0xbec], ebx
mov word [eax + 0xac4], 4
mov ecx, dword [ebp - 0x24]
push 0
call fcn.01028eed
jmp 0x1048fe2
push ebx
mov dword [esi + 0x110], 0x3e3
call fcn.01048160
jmp 0x1049429
push dword [ebp - 0x10]
call edi
push eax
lea eax, [ebp - 0xfc]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0x10
test eax, eax
jne 0x1048fa9
mov eax, dword [esi + 0x20]
mov ecx, dword [eax + 0xd4]
push ebx
call fcn.01039fc9
mov ecx, esi
call fcn.01052dda
mov dword [eax + 0x5c], ebx
jmp 0x1048fe2
push dword [ebp - 0x10]
call edi
push eax
lea eax, [ebp - 0xbc]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0x10
test eax, eax
jne 0x1048fcb
mov dword [ebp - 0x3c], ebx
jmp 0x1048fe2
push dword [ebp - 0x10]
call edi
push eax
push 0x1009a98
push dword [ebp - 0x10]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0x10
mov ecx, esi
call fcn.01048a97
test eax, eax
je 0x104941f
xor eax, eax
push eax
push eax
push eax
call fcn.0104beb8
add esp, 0xc
push 0x40
lea eax, [ebp - 0x1bc]
push eax
push 0x1775
call fcn.01061a93
push 0x40
lea eax, [ebp - 0x23c]
push eax
push 0x1776
call fcn.01061a93
push 0x40
lea eax, [ebp - 0x1fc]
push eax
push 0x1783
call fcn.01061a93
cmp word [ebp - 0x38], 0
jne 0x10492f7
lea eax, [ebp - 0x7c]
push eax
push 0
call dword [sym.imp.msvcrt.dll_wcstok]
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x10], eax
je 0x10492f7
cmp word [ebp - 0x2c], 0
jne 0x104907b
movsx eax, word [ebp - 0x20]
push eax
lea eax, [ebp - 0x7c]
push eax
push dword [ebp - 0x10]
push dword [ebp - 0x30]
call fcn.0105ab68
cmp eax, 0xfffffffe
jne 0x1049042
xor eax, eax
cmp word [ebp - 0x34], ax
jne 0x10492a5
mov ecx, dword [ebp - 0x10]
cmp word [ecx], 0x22
je 0x1049186
cmp word [ebp - 0x2c], ax
jne 0x10491ac
push ecx
call edi
push eax
lea eax, [ebp - 0x1bc]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0x10
test eax, eax
jne 0x10490bf
mov byte [ebp - 0x28], 0x1f
jmp 0x1049042
push dword [ebp - 0x10]
call edi
push eax
lea eax, [ebp - 0x23c]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0x10
test eax, eax
jne 0x10490e5
mov byte [ebp - 0x28], 0x1e
jmp 0x1049042
push dword [ebp - 0x10]
call edi
push eax
lea eax, [ebp - 0x1fc]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0x10
test eax, eax
jne 0x104910b
mov byte [ebp - 0x28], 0x26
jmp 0x1049042
cmp byte [ebp - 0x28], 0xff
jne 0x104917b
push ebx
push 0
push dword [ebp - 0x10]
push dword [0x10d356c]
push dword [0x10d3570]
call fcn.0105be5e
test eax, eax
jne 0x1049042
lea ecx, [ebp - 0x18]
call sub.MFC42u.DLL_CString::CString_3
push dword [ebp - 0x10]
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 2
call sub.MFC42u.DLL_CString::CString_4
push 0x4e48
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 3
call sub.MFC42u.DLL_CString::LoadStringW
push dword [ebp - 0x18]
lea ecx, [ebp - 0x14]
call sub.MFC42u.DLL_CString::FindOneOf
test eax, eax
push dword [ebp - 0x10]
jge 0x10492be
push 0xd2b
jmp 0x10492c3
push dword [ebp - 0x28]
push dword [ebp - 0x10]
jmp 0x1049276
cmp word [ebp - 0x2c], ax
jne 0x10491ac
push 0x10020dc
push dword [ebp - 0x1c]
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x10]
add eax, 2
mov dword [ebp - 0x2c], ebx
push eax
jmp 0x10491b3
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x10]
push dword [ebp - 0x1c]
mov ecx, esi
call fcn.01047365
cmp word [ebp - 0x2c], 0
jne 0x1049290
cmp byte [ebp - 0x28], 0xff
jne 0x1049270
push ebx
push 0
push dword [ebp - 0x1c]
push dword [0x10d356c]
push dword [0x10d3570]
call fcn.0105be5e
test eax, eax
jne 0x1049042
lea ecx, [ebp - 0x20]
call sub.MFC42u.DLL_CString::CString_3
push dword [ebp - 0x10]
and dword [ebp - 4], 0
lea ecx, [ebp - 0x24]
call sub.MFC42u.DLL_CString::CString_4
push 0x4e48
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], bl
call sub.MFC42u.DLL_CString::LoadStringW
push dword [ebp - 0x20]
lea ecx, [ebp - 0x24]
call sub.MFC42u.DLL_CString::FindOneOf
test eax, eax
push dword [ebp - 0x10]
jge 0x10492ed
mov edi, 0xd2b
push edi
push ebx
push ebx
push 0
call fcn.0104beb8
push dword [ebp - 0x10]
push edi
call fcn.01077db1
and byte [ebp - 4], 0
add esp, 0x1c
lea ecx, [ebp - 0x24]
mov dword [esi + 0x110], 0x1f
call sub.MFC42u.DLL_CString::CString
lea ecx, [ebp - 0x20]
or dword [ebp - 4], 0xffffffff
call sub.MFC42u.DLL_CString::CString
jmp 0x1049429
push dword [ebp - 0x28]
push dword [ebp - 0x1c]
push dword [0x10d356c]
push dword [0x10d3570]
call fcn.0105b158
or byte [ebp - 0x28], 0xff
jmp 0x1049042
push 0x100551c
push dword [ebp - 0x1c]
call dword [sym.imp.msvcrt.dll_wcscat]
pop ecx
pop ecx
jmp 0x1049042
push dword [ebp - 0x10]
push 0xa9
push ebx
push ebx
push 0
call fcn.0104beb8
add esp, 0x14
jmp 0x1049429
push 0xd3b
push ebx
push ebx
push 0
call fcn.0104beb8
add esp, 0x14
lea ecx, [ebp - 0x14]
mov dword [esi + 0x110], 0x1f
mov byte [ebp - 4], 2
call sub.MFC42u.DLL_CString::CString
lea ecx, [ebp - 0x18]
jmp 0x1049262
mov edi, 0xd3b
jmp 0x1049233
call fcn.010207aa
xor edi, edi
cmp word [ebp - 0x34], di
mov word [eax + 0xb88], 2
je 0x1049332
mov eax, dword [ebp - 0x30]
mov eax, dword [eax + 4]
cmp eax, 0xffffffff
je 0x104932c
cmp eax, ebx
je 0x104932c
push 0xab
push ebx
push ebx
push edi
call fcn.0104beb8
add esp, 0x10
mov eax, dword [ebp - 0x30]
mov dword [eax + 4], ebx
cmp word [ebp - 0x20], di
jne 0x104936b
push dword [ebp - 0x30]
push dword [0x10d3570]
call fcn.0105b23b
test eax, eax
jne 0x104936b
push 0xe27
call fcn.0107e7cd
pop ecx
push eax
push ebx
call fcn.0105c2f4
mov dword [esi + 0x110], 0x1f
jmp 0x1049429
lea eax, [ebp - 0x30]
push eax
call fcn.01059c32
call fcn.010207aa
cmp word [ebp - 0x3c], di
mov word [eax + 0xb88], 2
push ebx
je 0x1049390
push 0x3ee
jmp 0x10493af
cmp word [ebp - 0x20], di
je 0x104939d
push 0x3ea
jmp 0x10493af
cmp word [ebp - 0x34], di
je 0x10493aa
push 0x3f3
jmp 0x10493af
push 0x3e9
mov ecx, esi
call fcn.0104895c
cmp word [0x10d30b0], di
je 0x10493d5
cmp word [ebp - 0x20], di
je 0x10493cb
push edi
call fcn.01048160
mov dword [esi + 0x110], 0x1f
push dword [ebp - 0x14]
mov esi, dword [sym.imp.msvcrt.dll_free]
call esi
push dword [ebp - 0x1c]
call esi
pop ecx
pop ecx
jmp 0x1049429
xor eax, eax
push eax
push eax
push eax
call fcn.0104beb8
push dword [ebp - 0x10]
mov edi, 0xdc7
push edi
xor ebx, ebx
inc ebx
push ebx
push ebx
push 0
call fcn.0104beb8
push dword [ebp - 0x10]
push edi
call fcn.01077db1
push 0
push 8
push 0
call fcn.0104beb8
add esp, 0x34
mov dword [esi + 0x110], 0x57
mov eax, ebx
jmp 0x1049441
push dword [ebp - 0x14]
mov esi, dword [sym.imp.msvcrt.dll_free]
call esi
push dword [ebp - 0x1c]
call esi
pop ecx
pop ecx
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
push dword [ebp - 0x14]
mov edi, dword [sym.imp.msvcrt.dll_free]
call edi
push dword [ebp - 0x1c]
call edi
jmp 0x1048de3