Function at 0x403076
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
xor ebx, ebx
and dword [ebp - 8], ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0xc], ebx
test byte [ebp + 0x10], 1
mov dword [ebp - 4], edi
je 0x4031a1
push 0x40
lea eax, [ebp - 4]
mov dword [ebp - 0xc], 0x40
push eax
call fcn.00401ed1
mov esi, eax
test esi, esi
js 0x4032ba
push dword [ebp - 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push dword [ebp - 4]
push dword [ebp + 0xc]
call edi
test eax, eax
jne 0x4030fa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4030de
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x4030e5
mov esi, 0x80004005
push esi
push 0x108
push str.pathutil.cpp
call fcn.00403821
jmp 0x4032ba
mov ebx, dword [ebp - 0xc]
cmp ebx, eax
jae 0x403163
push eax
mov dword [ebp - 0xc], eax
lea eax, [ebp - 4]
push eax
call fcn.00401ed1
mov esi, eax
test esi, esi
js 0x4032ba
push dword [ebp - 0xc]
push dword [ebp - 4]
push dword [ebp + 0xc]
call edi
test eax, eax
jne 0x40314d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40313e
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x403145
mov esi, 0x80004005
push esi
push 0x113
jmp 0x4030eb
mov ebx, dword [ebp - 0xc]
cmp ebx, eax
jae 0x403163
mov eax, 0x8007007a
push eax
mov esi, eax
push 0x118
jmp 0x4030eb
cmp eax, 0x104
jbe 0x40319e
lea eax, [ebp - 4]
push eax
call fcn.00403583
lea esi, [eax + 0x7ff8ffa9]
neg esi
sbb esi, esi
and esi, eax
jl 0x4032ba
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 4]
call fcn.0040274c
mov esi, eax
test esi, esi
js 0x4032ba
mov ebx, dword [ebp - 0xc]
mov edi, dword [ebp - 4]
test byte [ebp + 0x10], 2
je 0x40329f
and dword [ebp + 0x10], 0
test edi, edi
jne 0x4031b6
mov edi, dword [ebp + 0xc]
cmp ebx, 0x40
ja 0x4031be
push 0x40
pop ebx
push ebx
lea eax, [ebp - 8]
push eax
call fcn.00401ed1
mov esi, eax
test esi, esi
js 0x4032ba
lea eax, [ebp + 0x10]
push eax
push dword [ebp - 8]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
jne 0x40320e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4031fc
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x403203
mov esi, 0x80004005
push esi
push 0x139
jmp 0x4030eb
cmp ebx, eax
jae 0x403284
mov ebx, eax
cmp eax, 0x104
jb 0x40321e
lea ebx, [eax + 7]
push ebx
lea eax, [ebp - 8]
push eax
call fcn.00401ed1
mov esi, eax
test esi, esi
js 0x4032ba
lea eax, [ebp + 0x10]
push eax
push dword [ebp - 8]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
jne 0x40326e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40325c
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x403263
mov esi, 0x80004005
push esi
push 0x144
jmp 0x4030eb
cmp ebx, eax
jae 0x403284
mov eax, 0x8007007a
push eax
mov esi, eax
push 0x149
jmp 0x4030eb
cmp eax, 0x104
jbe 0x40329a
lea eax, [ebp - 8]
push eax
call fcn.00403583
mov esi, eax
test esi, esi
js 0x4032ba
mov edi, dword [ebp - 8]
jmp 0x4032a6
and dword [ebp - 4], 0
mov dword [ebp - 8], edi
test edi, edi
jne 0x4032ad
mov edi, dword [ebp + 0xc]
push 0
push edi
push dword [ebp + 8]
call fcn.00402195
mov esi, eax
cmp dword [ebp - 8], 0
je 0x4032c8
push dword [ebp - 8]
call fcn.00445636
cmp dword [ebp - 4], 0
je 0x4032d6
push dword [ebp - 4]
call fcn.00445636
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc