Function at 0x403d40
Capabilities:
Check if file exists
Query environment variable
Set current directory

Disassembly:
push 0x14
mov eax, 0x57aa5b
call fcn.0054d3c4
mov dword [ebp - 0x14], ecx
and dword [ebp - 0x1c], 0
lea ecx, [ebp - 0x10]
call fcn.00401fc2
mov ebx, dword [ebp + 8]
mov ecx, ebx
mov dword [ebp - 4], 1
call fcn.00401fc2
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x1c], 1
cmp dword [eax + 0x28], 0
jne 0x403d97
add eax, 0x34
mov ecx, ebx
push eax
call fcn.004020eb
push ebx
mov ecx, 0x5eac64
call fcn.0040ccad
jmp 0x40405a
push ecx
lea edi, [eax + 0x24]
mov esi, esp
mov dword [ebp - 0x20], esi
mov eax, dword [edi]
sub eax, 0x10
mov dword [ebp - 0x18], edi
push eax
call fcn.00403470
add eax, 0x10
pop ecx
mov dword [esi], eax
call fcn.00405003
pop ecx
test eax, eax
je 0x403eb1
push edi
lea ecx, [ebp - 0x10]
call fcn.004020eb
lea ecx, [ebp + 0xc]
call fcn.00401fc2
mov ecx, dword [ebp - 0x14]
xor edi, edi
mov byte [ebp - 4], 2
mov eax, dword [ecx]
cmp dword [eax + 0x18], edi
jne 0x403dfc
lea eax, [ebp - 0x18]
push eax
call fcn.0040cfa5
pop ecx
push eax
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 3
call fcn.004020eb
jmp 0x403e40
lea eax, [ecx + 4]
push eax
lea ecx, [ebp + 0xc]
call fcn.004020eb
push edi
push dword [ebp + 0xc]
call fcn.0054ed5e
test eax, eax
je 0x403e4f
push str.D:_source_aprelSibSiblSibInstallerInstall.cpp
lea ecx, [ebp - 0x18]
call fcn.00401e70
mov esi, dword [eax]
push edi
push dword [ebp + 0xc]
mov byte [ebp - 4], 4
call fcn.0054ed5e
push 0x24d
push esi
push eax
call fcn.00418676
add esp, 0xc
mov ecx, dword [ebp - 0x18]
mov byte [ebp - 4], 2
lea ecx, [ecx - 0x10]
call fcn.00406137
mov esi, dword [ebp - 0x10]
push esi
push str.downloading__s
call fcn.0041955c
pop ecx
pop ecx
lea eax, [ebp + 0xc]
push eax
push ecx
lea eax, [esi - 0x10]
mov edi, esp
push eax
mov dword [ebp - 0x20], edi
call fcn.00403470
add eax, 0x10
pop ecx
mov dword [edi], eax
call fcn.00403798
pop ecx
pop ecx
test eax, eax
je 0x403e8f
push 0
push esi
push eax
call fcn.00418676
add esp, 0xc
mov ecx, dword [ebp - 0x14]
lea eax, [ebp + 0xc]
add ecx, 0x14
push eax
push dword [ecx + 8]
call fcn.0041d2a1
lea eax, [ebp + 0xc]
mov ecx, ebx
push eax
call fcn.004020eb
jmp 0x404037
push ecx
mov esi, esp
mov dword [ebp - 0x20], esi
mov eax, dword [edi]
sub eax, 0x10
push eax
call fcn.00403470
add eax, 0x10
pop ecx
mov dword [esi], eax
call fcn.0040505d
pop ecx
push edi
test eax, eax
je 0x404048
lea ecx, [ebp - 0x10]
call fcn.004020eb
mov edi, 0x104
mov ecx, ebx
push edi
call fcn.00405e6c
push edi
mov ecx, ebx
mov esi, eax
call fcn.00406699
push edi
push esi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0xffffffffffffffff
mov ecx, ebx
call fcn.0040614f
push dword [0x5eac54]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x403f51
push str.D:_source_aprelSibSiblSibInstallerInstall.cpp
lea ecx, [ebp - 0x20]
call fcn.00401e70
mov esi, dword [eax]
mov byte [ebp - 4], 5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x262
push esi
push eax
call fcn.00418676
mov ecx, dword [ebp - 0x20]
add esp, 0xc
mov byte [ebp - 4], 1
lea ecx, [ecx - 0x10]
call fcn.00406137
push ebx
lea ecx, [ebp - 0x10]
call fcn.004020eb
mov ecx, ebx
call fcn.00403aa6
push edi
mov ecx, ebx
call fcn.00405e6c
mov esi, 0x104
mov ecx, ebx
push esi
mov edi, eax
call fcn.00406699
push esi
mov esi, dword [ebp - 0x10]
push esi
push edi
call fcn.0055f0b5
mov edi, dword [ebp - 0x18]
add esp, 0xc
test eax, eax
jne 0x403f9a
push eax
push dword [edi]
push 2
call fcn.00418676
add esp, 0xc
push 0xffffffffffffffff
mov ecx, ebx
call fcn.0040614f
push dword [ebx]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x403ff3
push edi
mov ecx, ebx
call fcn.004020eb
push 0x104
mov ecx, ebx
call fcn.00405e6c
push 0x104
mov ecx, ebx
mov edi, eax
call fcn.00406699
push 0
push 0
push edi
call dword [sym.imp.SHELL32.dll_PathResolve]
push 0xffffffffffffffff
mov ecx, ebx
call fcn.0040614f
mov eax, dword [ebp - 0x14]
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
jmp 0x40405d
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x40]
cmp dword [eax - 0xc], 0
je 0x40405d
mov eax, dword [ebp - 0x14]
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x40405d
push str.D:_source_aprelSibSiblSibInstallerInstall.cpp
lea ecx, [ebp + 0xc]
call fcn.00401e70
mov edi, dword [eax]
mov byte [ebp - 4], 6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x279
push edi
push eax
call fcn.00418676
add esp, 0xc
mov ecx, dword [ebp + 0xc]
mov byte [ebp - 4], 1
lea ecx, [ecx - 0x10]
call fcn.00406137
jmp 0x40405d
mov ecx, ebx
call fcn.004020eb
push ebx
mov ecx, 0x5eac64
call fcn.0040cf0d
mov esi, dword [ebp - 0x10]
push dword [ebx]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x404076
push eax
push dword [ebx]
push 2
call fcn.00418676
add esp, 0xc
lea ecx, [esi - 0x10]
call fcn.00406137
mov eax, ebx
call fcn.0054d392
ret 8