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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58a26e
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x5f31c0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x20], 0
mov dword [ebp - 4], 2
call fcn.0042b4c7
mov ecx, eax
mov byte [ebp - 4], 1
test ecx, ecx
je 0x404fa6
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
mov dword [ebp - 4], 5
call fcn.0042b4c7
mov ecx, eax
mov byte [ebp - 4], 4
test ecx, ecx
je 0x404fb0
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ebx, dword [ebp + 8]
add eax, 0x10
mov byte [ebp - 4], 3
mov dword [ebx], eax
mov eax, dword [ebp + 0xc]
or edi, 0xffffffff
mov dword [ebp - 0x20], 1
cmp dword [eax + 0x28], 0
jne 0x404a70
add eax, 0x34
mov ecx, ebx
push eax
call fcn.00402490
push ebx
mov ecx, 0x5f7c40
call fcn.004154d0
jmp 0x404f62
add eax, 0x24
mov dword [ebp - 0x14], eax
mov eax, dword [eax]
sub eax, 0x10
push eax
call fcn.00403fb0
add eax, 0x10
add esp, 4
mov dword [ebp - 0x1c], eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 6
call fcn.0040a060
mov edi, dword [ebp - 0x1c]
cmp dword [edi - 0xc], 0
lea eax, [edi - 0x10]
mov dword [ebp - 0x24], eax
jl 0x404ae4
push 0x59c01c
push edi
call fcn.00562a29
add esp, 8
test eax, eax
je 0x404abd
sub eax, edi
sar eax, 1
je 0x404adb
cmp dword [edi - 0xc], 0
jl 0x404ae4
push 0x59c028
push edi
call fcn.00562a29
add esp, 8
test eax, eax
je 0x404ae4
sub eax, edi
sar eax, 1
jne 0x404ae4
mov dword [ebp - 0x1c], 1
jmp 0x404aeb
mov dword [ebp - 0x1c], 0
mov edx, dword [ebp - 0x24]
or edi, 0xffffffff
mov byte [ebp - 4], 3
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404b09
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp - 0x1c], 0
mov eax, dword [ebp - 0x14]
je 0x404c40
push eax
lea ecx, [ebp - 0x10]
call fcn.00402490
lea ecx, [ebp + 0xc]
call fcn.00402250
mov ecx, dword [ebp - 0x18]
mov byte [ebp - 4], 7
mov eax, dword [ecx]
cmp dword [eax + 0x18], 0
jne 0x404b51
lea eax, [ebp - 0x24]
push eax
call fcn.00415ac0
add esp, 4
push eax
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 8
call fcn.00402490
jmp 0x404b97
lea eax, [ecx + 4]
push eax
lea ecx, [ebp + 0xc]
call fcn.00402490
push 0
push dword [ebp + 0xc]
call fcn.0055f9d8
test eax, eax
je 0x404bb5
push str.D:_apreltechSibSiblSibInstallerInstall.cpp
lea ecx, [ebp - 0x24]
call fcn.004020a0
mov esi, dword [eax]
push 0
push dword [ebp + 0xc]
mov byte [ebp - 4], 9
call fcn.0055f9d8
push 0x284
push esi
push eax
call fcn.004279c0
add esp, 0xc
mov edx, dword [ebp - 0x24]
mov eax, edi
add edx, 0xfffffff0
mov byte [ebp - 4], 7
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404bb5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x10]
push esi
push str.downloading__s
call fcn.00428fe0
add esp, 8
lea eax, [ebp + 0xc]
push eax
push ecx
lea eax, [esi - 0x10]
mov edi, esp
push eax
mov dword [ebp - 0x24], edi
call fcn.00403fb0
add esp, 4
add eax, 0x10
mov dword [edi], eax
call fcn.00404160
add esp, 8
test eax, eax
je 0x404bf9
push 0
push esi
push eax
call fcn.004279c0
add esp, 0xc
mov ecx, dword [ebp - 0x18]
lea eax, [ebp + 0xc]
add ecx, 0x14
push eax
push dword [ecx + 8]
call fcn.0042d8aa
lea eax, [ebp + 0xc]
mov ecx, ebx
push eax
call fcn.00402490
mov edx, dword [ebp + 0xc]
or edi, 0xffffffff
mov byte [ebp - 4], 3
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404f62
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x404f62
mov eax, dword [eax]
sub eax, 0x10
push eax
call fcn.00403fb0
add eax, 0x10
add esp, 4
mov dword [ebp - 0x1c], eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0xa
call fcn.0040a060
mov edi, dword [ebp - 0x1c]
cmp dword [edi - 0xc], 0
lea edx, [edi - 0x10]
mov dword [ebp - 0x1c], edx
jge 0x404c74
or edi, 0xffffffff
jmp 0x404c99
push 0x59c030
push edi
call fcn.00562a29
mov edx, dword [ebp - 0x1c]
mov ecx, eax
add esp, 8
test ecx, ecx
jne 0x404c90
or edi, 0xffffffff
jmp 0x404c99
sub ecx, edi
sar ecx, 1
mov dword [ebp - 0x24], ecx
mov edi, ecx
mov byte [ebp - 4], 3
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404cb2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x14]
cmp edi, 1
je 0x404f4d
lea ecx, [ebp - 0x10]
call fcn.00402490
mov eax, dword [ebx]
mov edi, 1
mov ecx, edi
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x104
or eax, ecx
jge 0x404cea
push 0x104
mov ecx, ebx
call fcn.00408b40
mov ecx, dword [ebx]
cmp dword [ecx - 8], 0x104
jl 0x404fba
mov dword [ecx - 0xc], 0x104
xor edx, edx
mov eax, dword [ebx]
push 0x104
push ecx
push dword [ebp - 0x10]
mov word [eax + 0x208], dx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov eax, dword [ebx]
test eax, eax
jne 0x404d24
xor ecx, ecx
jmp 0x404d3a
push dword [eax - 8]
push eax
call fcn.00566c08
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x404fba
mov eax, dword [ebx]
cmp ecx, dword [eax - 8]
jg 0x404fba
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [ebx]
mov word [eax + ecx*2], dx
push dword [0x5f7bb4]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x404da7
push str.D:_apreltechSibSiblSibInstallerInstall.cpp
lea ecx, [ebp - 0x24]
call fcn.004020a0
mov esi, dword [eax]
mov byte [ebp - 4], 0xb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x299
push esi
push eax
call fcn.004279c0
mov edx, dword [ebp - 0x24]
add esp, 0xc
mov byte [ebp - 4], 3
add edx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404da7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push ebx
lea ecx, [ebp - 0x10]
call fcn.00402490
mov ecx, ebx
call fcn.00404600
mov eax, dword [ebx]
mov ecx, edi
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x104
or eax, ecx
jge 0x404dd6
push 0x104
mov ecx, ebx
call fcn.00408b40
mov ecx, dword [ebx]
cmp dword [ecx - 8], 0x104
jl 0x404fba
mov esi, dword [ebp - 0x10]
xor edx, edx
mov dword [ecx - 0xc], 0x104
mov eax, dword [ebx]
push 0x104
push esi
push ecx
mov word [eax + 0x208], dx
call fcn.00570136
add esp, 0xc
test eax, eax
jne 0x404e1e
push eax
mov eax, dword [ebp + 0xc]
push dword [eax + 0x24]
push 2
call fcn.004279c0
add esp, 0xc
mov eax, dword [ebx]
test eax, eax
jne 0x404e28
xor ecx, ecx
jmp 0x404e3e
push dword [eax - 8]
push eax
call fcn.00566c08
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x404fba
mov eax, dword [ebx]
cmp ecx, dword [eax - 8]
jg 0x404fba
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [ebx]
mov word [eax + ecx*2], dx
push dword [ebx]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x404efa
push dword [ebp - 0x14]
mov ecx, ebx
call fcn.00402490
mov eax, dword [ebx]
sub edi, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x104
or edi, eax
jge 0x404e8b
push 0x104
mov ecx, ebx
call fcn.00408b40
mov ecx, dword [ebx]
cmp dword [ecx - 8], 0x104
jl 0x404fba
xor edx, edx
mov dword [ecx - 0xc], 0x104
mov eax, dword [ebx]
push edx
push edx
push ecx
mov word [eax + 0x208], dx
call dword [sym.imp.SHELL32.dll_PathResolve]
mov eax, dword [ebx]
test eax, eax
jne 0x404ebf
xor ecx, ecx
jmp 0x404ed5
push dword [eax - 8]
push eax
call fcn.00566c08
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x404fba
mov eax, dword [ebx]
cmp ecx, dword [eax - 8]
jg 0x404fba
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [ebx]
mov word [eax + ecx*2], dx
mov eax, dword [ebp - 0x18]
push dword [eax + 4]
mov eax, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call eax
jmp 0x404f5f
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x40]
cmp dword [eax - 0xc], 0
je 0x404f5f
mov eax, dword [ebp - 0x18]
push dword [eax + 4]
mov eax, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call eax
test eax, eax
jne 0x404f5f
push str.D:_apreltechSibSiblSibInstallerInstall.cpp
lea ecx, [ebp + 0xc]
call fcn.004020a0
mov edi, dword [eax]
mov byte [ebp - 4], 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x2b0
push edi
push eax
call fcn.004279c0
add esp, 0xc
mov byte [ebp - 4], 3
lea ecx, [ebp + 0xc]
call fcn.004023e0
jmp 0x404f5f
mov ecx, ebx
call fcn.00402490
push ebx
mov ecx, 0x5f7c40
call fcn.00415970
or edi, 0xffffffff
push dword [ebx]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x404f7b
push eax
push dword [ebx]
push 2
call fcn.004279c0
add esp, 0xc
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x404f90
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0x80004005
call fcn.00403c70
push 0x80004005
call fcn.00403c70
push 0x80070057
call fcn.00403c70
int3