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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46243e
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x47e700]
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.0042a268
mov ecx, eax
mov byte [ebp - 4], 1
test ecx, ecx
je 0x404646
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
mov dword [ebp - 4], 5
call fcn.0042a268
mov ecx, eax
mov byte [ebp - 4], 4
test ecx, ecx
je 0x404650
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 0x404110
add eax, 0x34
mov ecx, ebx
push eax
call fcn.00401b30
push ebx
mov ecx, 0x4801f0
call fcn.00414790
jmp 0x404602
add eax, 0x24
mov dword [ebp - 0x14], eax
mov eax, dword [eax]
sub eax, 0x10
push eax
call fcn.00403650
add eax, 0x10
add esp, 4
mov dword [ebp - 0x1c], eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 6
call fcn.00409710
mov edi, dword [ebp - 0x1c]
cmp dword [edi - 0xc], 0
lea eax, [edi - 0x10]
mov dword [ebp - 0x24], eax
jl 0x404184
push 0x4668fc
push edi
call fcn.0043c7ee
add esp, 8
test eax, eax
je 0x40415d
sub eax, edi
sar eax, 1
je 0x40417b
cmp dword [edi - 0xc], 0
jl 0x404184
push 0x466908
push edi
call fcn.0043c7ee
add esp, 8
test eax, eax
je 0x404184
sub eax, edi
sar eax, 1
jne 0x404184
mov dword [ebp - 0x1c], 1
jmp 0x40418b
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 0x4041a9
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 0x4042e0
push eax
lea ecx, [ebp - 0x10]
call fcn.00401b30
lea ecx, [ebp + 0xc]
call fcn.004018f0
mov ecx, dword [ebp - 0x18]
mov byte [ebp - 4], 7
mov eax, dword [ecx]
cmp dword [eax + 0x18], 0
jne 0x4041f1
lea eax, [ebp - 0x24]
push eax
call fcn.00414d80
add esp, 4
push eax
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 8
call fcn.00401b30
jmp 0x404237
lea eax, [ecx + 4]
push eax
lea ecx, [ebp + 0xc]
call fcn.00401b30
push 0
push dword [ebp + 0xc]
call fcn.0043982f
test eax, eax
je 0x404255
push str.D:_apreltechSibSiblSibInstallerInstall.cpp
lea ecx, [ebp - 0x24]
call fcn.00401740
mov esi, dword [eax]
push 0
push dword [ebp + 0xc]
mov byte [ebp - 4], 9
call fcn.0043982f
push 0x284
push esi
push eax
call fcn.00426c80
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 0x404255
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.004282a0
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.00403650
add esp, 4
add eax, 0x10
mov dword [edi], eax
call fcn.00403800
add esp, 8
test eax, eax
je 0x404299
push 0
push esi
push eax
call fcn.00426c80
add esp, 0xc
mov ecx, dword [ebp - 0x18]
lea eax, [ebp + 0xc]
add ecx, 0x14
push eax
push dword [ecx + 8]
call fcn.0042c031
lea eax, [ebp + 0xc]
mov ecx, ebx
push eax
call fcn.00401b30
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 0x404602
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x404602
mov eax, dword [eax]
sub eax, 0x10
push eax
call fcn.00403650
add eax, 0x10
add esp, 4
mov dword [ebp - 0x1c], eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0xa
call fcn.00409710
mov edi, dword [ebp - 0x1c]
cmp dword [edi - 0xc], 0
lea edx, [edi - 0x10]
mov dword [ebp - 0x1c], edx
jge 0x404314
or edi, 0xffffffff
jmp 0x404339
push 0x466910
push edi
call fcn.0043c7ee
mov edx, dword [ebp - 0x1c]
mov ecx, eax
add esp, 8
test ecx, ecx
jne 0x404330
or edi, 0xffffffff
jmp 0x404339
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 0x404352
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x14]
cmp edi, 1
je 0x4045ed
lea ecx, [ebp - 0x10]
call fcn.00401b30
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 0x40438a
push 0x104
mov ecx, ebx
call fcn.004081f0
mov ecx, dword [ebx]
cmp dword [ecx - 8], 0x104
jl 0x40465a
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 0x4043c4
xor ecx, ecx
jmp 0x4043da
push dword [eax - 8]
push eax
call fcn.00440963
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x40465a
mov eax, dword [ebx]
cmp ecx, dword [eax - 8]
jg 0x40465a
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [ebx]
mov word [eax + ecx*2], dx
push dword [0x480164]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x404447
push str.D:_apreltechSibSiblSibInstallerInstall.cpp
lea ecx, [ebp - 0x24]
call fcn.00401740
mov esi, dword [eax]
mov byte [ebp - 4], 0xb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x299
push esi
push eax
call fcn.00426c80
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 0x404447
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push ebx
lea ecx, [ebp - 0x10]
call fcn.00401b30
mov ecx, ebx
call fcn.00403ca0
mov eax, dword [ebx]
mov ecx, edi
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x104
or eax, ecx
jge 0x404476
push 0x104
mov ecx, ebx
call fcn.004081f0
mov ecx, dword [ebx]
cmp dword [ecx - 8], 0x104
jl 0x40465a
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.00449d76
add esp, 0xc
test eax, eax
jne 0x4044be
push eax
mov eax, dword [ebp + 0xc]
push dword [eax + 0x24]
push 2
call fcn.00426c80
add esp, 0xc
mov eax, dword [ebx]
test eax, eax
jne 0x4044c8
xor ecx, ecx
jmp 0x4044de
push dword [eax - 8]
push eax
call fcn.00440963
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x40465a
mov eax, dword [ebx]
cmp ecx, dword [eax - 8]
jg 0x40465a
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 0x40459a
push dword [ebp - 0x14]
mov ecx, ebx
call fcn.00401b30
mov eax, dword [ebx]
sub edi, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x104
or edi, eax
jge 0x40452b
push 0x104
mov ecx, ebx
call fcn.004081f0
mov ecx, dword [ebx]
cmp dword [ecx - 8], 0x104
jl 0x40465a
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 0x40455f
xor ecx, ecx
jmp 0x404575
push dword [eax - 8]
push eax
call fcn.00440963
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x40465a
mov eax, dword [ebx]
cmp ecx, dword [eax - 8]
jg 0x40465a
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 0x4045ff
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x40]
cmp dword [eax - 0xc], 0
je 0x4045ff
mov eax, dword [ebp - 0x18]
push dword [eax + 4]
mov eax, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call eax
test eax, eax
jne 0x4045ff
push str.D:_apreltechSibSiblSibInstallerInstall.cpp
lea ecx, [ebp + 0xc]
call fcn.00401740
mov edi, dword [eax]
mov byte [ebp - 4], 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x2b0
push edi
push eax
call fcn.00426c80
add esp, 0xc
mov byte [ebp - 4], 3
lea ecx, [ebp + 0xc]
call fcn.00401a80
jmp 0x4045ff
mov ecx, ebx
call fcn.00401b30
push ebx
mov ecx, 0x4801f0
call fcn.00414c30
or edi, 0xffffffff
push dword [ebx]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40461b
push eax
push dword [ebx]
push 2
call fcn.00426c80
add esp, 0xc
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x404630
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.00403310
push 0x80004005
call fcn.00403310
push 0x80070057
call fcn.00403310
int3