Function at 0x45ff00
Capabilities:
Check if file exists
Query environment variable

Disassembly:
push 0xffffffffffffffff
push 0x4b8420
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4e1370]
xor eax, esp
push eax
lea eax, [esp + 0x2c]
mov dword fs:[0], eax
xor ebp, ebp
mov dword [esp + 0x34], ebp
mov eax, dword [0x4e7464]
mov edx, dword [eax + 0xc]
mov ecx, 0x4e7464
mov dword [esp + 0x1c], ebp
call edx
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x34], 1
mov eax, dword [0x4e7464]
mov edx, dword [eax + 0xc]
mov ecx, 0x4e7464
call edx
lea ebx, [eax + 0x10]
mov dword [esp + 0x28], ebx
mov byte [esp + 0x34], 2
mov eax, dword [0x4e7464]
mov edx, dword [eax + 0xc]
mov ecx, 0x4e7464
call edx
lea esi, [eax + 0x10]
mov dword [esp + 0x20], esi
mov byte [esp + 0x34], 3
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x1000
or eax, ecx
jge 0x45ffa8
mov ecx, 0x1000
lea eax, [esp + 0x20]
call fcn.00405860
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x3c]
push 0x1000
push esi
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edi, eax
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004913b1
add esp, 8
cmp eax, ebp
jl 0x46042d
cmp eax, dword [esi - 8]
jg 0x46042d
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
cmp edi, ebp
jne 0x46008f
lea eax, [esi - 0x10]
mov byte [esp + 0x34], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x46000b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
mov byte [esp + 0x34], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46002c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x34], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x460051
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x34], 0xffffffff
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x460079
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x1000
or eax, ecx
jge 0x4600b5
mov ecx, 0x1000
lea eax, [esp + 0x20]
call fcn.00405860
mov esi, dword [esp + 0x20]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004913b1
add esp, 8
cmp eax, ebp
jl 0x46042d
cmp eax, dword [esi - 8]
jg 0x46042d
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
cmp word [esi], 0x22
mov dword [esp + 0x24], ebp
jne 0x460178
lea edi, [esi + 2]
push 0x22
push edi
call fcn.00490c36
add esp, 8
cmp eax, ebp
je 0x460382
xor edx, edx
push 0x5c
push edi
mov word [eax], dx
lea ebp, [eax + 2]
call fcn.00490c36
add esp, 8
test eax, eax
jne 0x46013b
mov eax, dword [esp + 0x18]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x28], esp
mov ebx, esp
call fcn.0040bbd0
add eax, 0x10
mov ecx, edi
mov dword [ebx], eax
call fcn.0045fc60
jmp 0x460292
test edi, edi
jne 0x460143
xor eax, eax
jmp 0x46015f
mov eax, edi
lea edx, [eax + 2]
jmp 0x460150
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x460150
sub eax, edx
sar eax, 1
mov ebx, eax
push edi
lea eax, [esp + 0x1c]
call fcn.00405920
mov dword [esp + 0x1c], 1
jmp 0x4602a1
mov eax, dword [esi - 0xc]
lea edi, [esi + eax*2]
cmp edi, esi
jb 0x4601d3
mov eax, dword [esi - 0xc]
xor ebx, ebx
lea eax, [esi + eax*2]
cmp edi, eax
sete bl
cmp word [edi], 0x20
je 0x460199
test ebx, ebx
je 0x4601cc
mov ebp, edi
test ebx, ebx
je 0x4601a5
mov dword [esp + 0x24], edi
jmp 0x4601ac
lea ecx, [edi + 2]
mov dword [esp + 0x24], ecx
test ebx, ebx
jne 0x4601b5
xor edx, edx
mov word [edi], dx
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x46020b
test ebx, ebx
jne 0x4601cc
mov eax, 0x20
mov word [edi], ax
sub edi, 2
cmp edi, esi
jae 0x460182
mov edi, dword [esp + 0x18]
xor ecx, ecx
mov word [ebp], cx
push ecx
mov ecx, dword [edi - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
add edi, 0xfffffff0
mov dword [esp + 0x20], esp
mov ebp, esp
call eax
cmp dword [edi + 0xc], 0
lea ecx, [edi + 0xc]
jl 0x460245
cmp eax, dword [edi]
jne 0x460245
mov ebx, edi
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x460281
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
neg eax
sbb eax, eax
add eax, 1
mov dword [esp + 0x1c], eax
je 0x4601d3
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x460224
sub eax, edx
sar eax, 1
mov ebx, eax
push esi
lea eax, [esp + 0x1c]
call fcn.00405920
mov ebp, dword [esp + 0x24]
jmp 0x4602a1
mov ecx, dword [edi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov ebx, eax
test ebx, ebx
jne 0x46025e
call fcn.00405210
mov eax, dword [edi + 4]
mov dword [ebx + 4], eax
mov eax, dword [edi + 4]
lea ecx, [eax + eax + 2]
push ecx
add edi, 0x10
lea edx, [eax + eax + 2]
push edi
push edx
lea eax, [ebx + 0x10]
push eax
call fcn.004903e8
add esp, 0x10
add ebx, 0x10
mov ecx, esi
mov dword [ebp], ebx
call fcn.0045fc60
mov ebp, dword [esp + 0x28]
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
je 0x460382
test ebp, ebp
jne 0x4602a9
xor eax, eax
jmp 0x4602bf
mov eax, ebp
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4602b0
sub eax, edx
sar eax, 1
mov ebx, eax
push ebp
lea eax, [esp + 0x2c]
call fcn.00405920
cmp dword [esp + 0x1c], 0
je 0x460382
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x18]
mov edi, dword [ecx]
lea eax, [edx - 0x10]
sub edi, 0x10
cmp eax, edi
je 0x46032c
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x460321
mov ebp, dword [eax]
cmp ebp, dword [edi]
jne 0x460321
call fcn.0040bbd0
mov ebp, eax
or ecx, 0xffffffff
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x460316
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov ecx, dword [esp + 0x40]
add ebp, 0x10
mov dword [ecx], ebp
jmp 0x46032c
mov ebx, dword [edx - 0xc]
push edx
mov eax, ecx
call fcn.00405920
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x28]
mov edi, dword [edx]
lea eax, [ecx - 0x10]
sub edi, 0x10
cmp eax, edi
je 0x460382
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x460377
mov ebp, dword [eax]
cmp ebp, dword [edi]
jne 0x460377
call fcn.0040bbd0
mov ebp, eax
or edx, 0xffffffff
lock xadd dword [ebx], edx
dec edx
test edx, edx
jg 0x46036c
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov eax, dword [esp + 0x44]
add ebp, 0x10
mov dword [eax], ebp
jmp 0x460382
mov ebx, dword [ecx - 0xc]
push ecx
mov eax, edx
call fcn.00405920
lea eax, [esi - 0x10]
mov byte [esp + 0x34], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4603a3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x34], 1
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4603c8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x34], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4603ed
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x34], 0xffffffff
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x460415
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
push 0x80070057
call fcn.004058d0
int3