Function at 0x10044440
Capabilities:
Get common file path
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x64c]
sub esp, 0x64c
push 0xffffffffffffffff
push 0x1009d971
mov eax, dword fs:[0]
push eax
sub esp, 0x14
mov eax, dword [0x100ef034]
xor eax, ebp
mov dword [ebp + 0x648], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov bl, dl
mov eax, ecx
mov dword [ebp - 0x18], eax
mov esi, dword [eax]
mov ecx, str.ProgramFiles64Folder
mov eax, esi
nop dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x100444b6
test dx, dx
je 0x100444b2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x100444b6
add eax, 4
add ecx, 4
test dx, dx
jne 0x10044490
xor eax, eax
jmp 0x100444bb
sbb eax, eax
or eax, 1
or edi, 0xffffffff
test eax, eax
jne 0x100445b5
lea ecx, [esi - 0x10]
call fcn.10040870
add eax, 0x10
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x14]
push str.ProgramW6432
call fcn.10043670
test eax, eax
je 0x10044594
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
mov edi, dword [edx]
lea ebx, [eax - 0x10]
sub edi, 0x10
cmp ebx, edi
je 0x1004454b
cmp dword [edi + 0xc], 0
lea esi, [edi + 0xc]
jl 0x10044540
mov ecx, dword [ebx]
cmp ecx, dword [edi]
jne 0x10044540
mov ecx, ebx
call fcn.10040870
mov dword [ebp - 0x1c], eax
or ecx, 0xffffffff
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x10044536
mov esi, dword [edi]
push edi
mov ecx, dword [esi]
mov edx, dword [ecx + 4]
mov ecx, esi
call edx
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
add eax, 0x10
mov dword [ecx], eax
jmp 0x1004454b
push dword [eax - 0xc]
mov ecx, edx
push eax
call fcn.1003f950
mov ecx, dword [ebp - 0x18]
call fcn.10043540
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x1004456f
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x648]
xor ecx, ebp
call fcn.1007685e
lea esp, [ebp + 0x64c]
pop ebp
ret
mov dword [ebp - 4], 0xffffffff
mov eax, edi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x100445b5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 0xd], 1
call fcn.1003aaa0
test eax, eax
je 0x10044f26
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 4
lea ecx, [ebp - 0x14]
push str.SystemFolder
call fcn.1003f670
test al, al
jne 0x100445fa
push 0xc
push str.SystemFolder
lea ecx, [ebp - 0x14]
call fcn.1003f950
mov dword [ebp - 4], 5
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x10044f26
mov ecx, dword [ebp - 0x18]
mov edx, eax
mov ecx, dword [ecx]
mov si, word [ecx]
cmp si, word [edx]
jne 0x10044639
test si, si
je 0x10044635
mov si, word [ecx + 2]
cmp si, word [edx + 2]
jne 0x10044639
add ecx, 4
add edx, 4
test si, si
jne 0x10044613
xor esi, esi
jmp 0x1004463e
sbb esi, esi
or esi, 1
mov dword [ebp - 4], 0xffffffff
lea edx, [eax - 0x10]
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1004465c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
jne 0x100446b6
lea eax, [ebp + 0x440]
push eax
movzx eax, bl
xor eax, 1
push esi
push esi
lea eax, [eax*4 + 0x25]
push eax
push esi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea ecx, [ebp + 0x440]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10044687
sub ecx, edx
lea eax, [ebp + 0x440]
sar ecx, 1
push ecx
mov ecx, dword [ebp - 0x18]
push eax
call fcn.1003f950
mov ecx, dword [ebp - 0x18]
call fcn.10043540
mov al, byte [ebp - 0xd]
jmp 0x10044571
call fcn.1003aaa0
test eax, eax
je 0x10044f26
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 7
lea ecx, [ebp - 0x14]
push str.System32Folder
call fcn.1003f670
test al, al
jne 0x100446f7
push 0xe
push str.System32Folder
lea ecx, [ebp - 0x14]
call fcn.1003f950
mov dword [ebp - 4], 8
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x10044f26
mov ebx, dword [ebp - 0x18]
mov edx, eax
mov ecx, dword [ebx]
mov si, word [ecx]
cmp si, word [edx]
jne 0x10044736
test si, si
je 0x10044732
mov si, word [ecx + 2]
cmp si, word [edx + 2]
jne 0x10044736
add ecx, 4
add edx, 4
test si, si
jne 0x10044710
xor esi, esi
jmp 0x1004473b
sbb esi, esi
or esi, 1
mov dword [ebp - 4], 0xffffffff
lea edx, [eax - 0x10]
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10044759
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
jne 0x100447c7
push 0x104
lea eax, [ebp + 0x440]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov ecx, 0x5c
mov word [ebp + eax*2 + 0x440], cx
lea eax, [eax*2 + 2]
cmp eax, 0x208
jae 0x10044f30
xor ecx, ecx
mov word [ebp + eax + 0x440], cx
lea ecx, [ebp + 0x440]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100447a1
sub ecx, edx
lea eax, [ebp + 0x440]
sar ecx, 1
push ecx
push eax
mov ecx, ebx
call fcn.1003f950
mov al, byte [ebp - 0xd]
jmp 0x10044571
call fcn.1003aaa0
test eax, eax
je 0x10044f26
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 0xa
lea ecx, [ebp - 0x14]
push str.WindowsFolder
call fcn.1003f670
test al, al
jne 0x10044808
push 0xd
push str.WindowsFolder
lea ecx, [ebp - 0x14]
call fcn.1003f950
mov dword [ebp - 4], 0xb
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x10044f26
mov ecx, dword [ebx]
mov edx, eax
nop
mov si, word [ecx]
cmp si, word [edx]
jne 0x10044846
test si, si
je 0x10044842
mov si, word [ecx + 2]
cmp si, word [edx + 2]
jne 0x10044846
add ecx, 4
add edx, 4
test si, si
jne 0x10044820
xor esi, esi
jmp 0x1004484b
sbb esi, esi
or esi, 1
mov dword [ebp - 4], 0xffffffff
lea edx, [eax - 0x10]
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10044869
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
jne 0x100448c1
push 0x104
lea eax, [ebp + 0x440]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov ecx, 0x5c
mov word [ebp + eax*2 + 0x440], cx
lea eax, [eax*2 + 2]
cmp eax, 0x208
jae 0x10044f30
xor ecx, ecx
mov word [ebp + eax + 0x440], cx
lea ecx, [ebp + 0x440]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100448b1
jmp 0x100447ac
call fcn.1003aaa0
test eax, eax
je 0x10044f26
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 0xd
lea ecx, [ebp - 0x14]
push str.WindowsVolume
call fcn.1003f670
test al, al
jne 0x10044902
push 0xd
push str.WindowsVolume
lea ecx, [ebp - 0x14]
call fcn.1003f950
mov dword [ebp - 4], 0xe
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x10044f26
mov ecx, dword [ebx]
mov edx, eax
mov si, word [ecx]
cmp si, word [edx]
jne 0x1004493e
test si, si
je 0x1004493a
mov si, word [ecx + 2]
cmp si, word [edx + 2]
jne 0x1004493e
add ecx, 4
add edx, 4
test si, si
jne 0x10044918
xor esi, esi
jmp 0x10044943
sbb esi, esi
or esi, 1
mov dword [ebp - 4], 0xffffffff
lea edx, [eax - 0x10]
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10044961
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
jne 0x100449a0
push 0x104
lea eax, [ebp + 0x440]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
xor eax, eax
lea ecx, [ebp + 0x440]
mov word [ebp + 0x446], ax
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10044990
jmp 0x100447ac
mov edi, dword [ebx]
mov ecx, str.TempFolder
mov eax, edi
nop dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x100449d6
test dx, dx
je 0x100449d2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x100449d6
add eax, 4
add ecx, 4
test dx, dx
jne 0x100449b0
xor eax, eax
jmp 0x100449db
sbb eax, eax
or eax, 1
test eax, eax
jne 0x10044a56
lea ecx, [ebp]
call fcn.1003ae00
mov dword [ebp - 4], 0x10
lea ecx, [ebp + 0x18]
push ecx
mov ecx, eax
call fcn.10047330
mov edx, eax
mov byte [ebp - 4], 0x11
cmp dword [edx + 0x14], 8
jb 0x10044a07
mov edx, dword [edx]
test edx, edx
jne 0x10044a0f
xor ecx, ecx
jmp 0x10044a23
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10044a14
sub ecx, esi
sar ecx, 1
push ecx
push edx
mov ecx, ebx
call fcn.1003f950
mov byte [ebp - 4], 0x10
lea ecx, [ebp + 0x18]
call fcn.10038340
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp]
call fcn.10038340
mov ecx, ebx
call fcn.10043540
mov al, byte [ebp - 0xd]
jmp 0x10044571
mov ecx, str.SETUPEXEDIR
mov eax, edi
nop dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x10044a86
test dx, dx
je 0x10044a82
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10044a86
add eax, 4
add ecx, 4
test dx, dx
jne 0x10044a60
xor eax, eax
jmp 0x10044a8b
sbb eax, eax
or eax, 1
test eax, eax
jne 0x10044b78
mov eax, dword [0x100fdcc0]
cmp dword [eax - 0xc], 0
jne 0x10044b1b
push 0x104
lea eax, [ebp + 0x440]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
sub eax, 1
je 0x10044ad0
nop word [eax + eax]
cmp word [ebp + eax*2 + 0x440], 0x5c
je 0x10044ad0
sub eax, 1
jne 0x10044ac0
lea eax, [eax*2 + 2]
cmp eax, 0x208
jae 0x10044f30
xor ecx, ecx
mov word [ebp + eax + 0x440], cx
lea ecx, [ebp + 0x440]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10044af5
sub ecx, edx
lea eax, [ebp + 0x440]
sar ecx, 1
push ecx
push eax
mov ecx, 0x100fdcc0
call fcn.1003f950
mov eax, dword [0x100fdcc0]
mov esi, dword [ebx]
lea ecx, [eax - 0x10]
sub esi, 0x10
cmp ecx, esi
je 0x10044d72
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x10044b65
mov edx, dword [ecx]
cmp edx, dword [esi]
jne 0x10044b65
call fcn.10040870
mov ebx, eax
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x10044b55
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov ecx, dword [ebp - 0x18]
lea eax, [ebx + 0x10]
mov dword [ecx], eax
mov al, byte [ebp - 0xd]
jmp 0x10044571
push dword [eax - 0xc]
mov ecx, ebx
push eax
call fcn.1003f950
mov al, byte [ebp - 0xd]
jmp 0x10044571
xor esi, esi
nop word [eax + eax]
mov eax, dword [esi*4 + 0x100c8e68]
test eax, eax
je 0x10044f26
mov ecx, edi
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x10044bb7
test dx, dx
je 0x10044bb3
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x10044bb7
add ecx, 4
add eax, 4
test dx, dx
jne 0x10044b91
xor eax, eax
jmp 0x10044bbc
sbb eax, eax
or eax, 1
test eax, eax
je 0x10044bcd
inc esi
cmp esi, 0xe
jb 0x10044b80
xor al, al
jmp 0x10044571
cmp esi, 0xe
jae 0x10044bc6
lea eax, [ebp - 0x1c]
push eax
push dword [esi*4 + 0x100c8e30]
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
je 0x10044ecc
mov eax, dword fs:[0x2c]
mov ecx, dword [0x100fd210]
mov edi, dword [esi*4 + 0x100c8e30]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x100fdf4c]
cmp eax, dword [ecx + 4]
jle 0x10044c5f
push 0x100fdf4c
call fcn.10076c14
add esp, 4
cmp dword [0x100fdf4c], 0xffffffff
jne 0x10044c5f
mov dword [ebp - 4], 0x14
push 0x100b7850
mov dword [0x100fdf50], 0x100c54a8
mov dword [0x100fdf54], 0
call fcn.10076fef
mov dword [ebp - 4], 0xffffffff
push 0x100fdf4c
call fcn.10076bca
add esp, 8
cmp dword [0x100fdf54], 0
jne 0x10044d24
push str.shfolder.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ecx, dword [0x100fdf54]
mov esi, eax
cmp esi, ecx
je 0x10044c99
mov edx, dword [0x100fdf50]
mov ecx, 0x100fdf50
call dword [edx + 4]
mov ecx, esi
mov dword [0x100fdf54], ecx
test ecx, ecx
je 0x10044cb2
push 0x100c8de0
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x100fd9f8], eax
test eax, eax
jne 0x10044d2d
mov eax, dword [0x100efa88]
cmp eax, 0xffffffff
jne 0x10044d7f
lea eax, [ebp - 0x20]
mov dword [0x100efa88], 0
push eax
lea edx, [ebp - 0x14]
mov ecx, str.Shlwapi.dll
call fcn.10043d20
add esp, 4
test al, al
je 0x10044cea
cmp dword [ebp - 0x14], 5
ja 0x10044d18
je 0x10044d18
mov eax, dword [0x100efa88]
cmp eax, 1
je 0x10044d82
lea eax, [ebp - 0x20]
mov ecx, str.Shell32.dll
push eax
lea edx, [ebp - 0x14]
call fcn.10043d20
add esp, 4
test al, al
je 0x10044d7a
cmp dword [ebp - 0x14], 5
ja 0x10044d18
jne 0x10044d7a
mov eax, 1
mov dword [0x100efa88], eax
jmp 0x10044d7f
mov eax, dword [0x100fd9f8]
test eax, eax
je 0x10044cb2
lea ecx, [ebp + 0x30]
push ecx
push 0
push 0
push edi
push 0
call eax
test eax, eax
jne 0x10044cb2
lea ecx, [ebp + 0x30]
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10044d50
lea eax, [ebp + 0x30]
sub ecx, edx
sar ecx, 1
push ecx
push eax
mov ecx, ebx
call fcn.1003f950
mov ecx, ebx
call fcn.10043540
mov al, byte [ebp - 0xd]
jmp 0x10044571
mov eax, dword [0x100efa88]
cmp eax, 1
sete al
test al, al
jne 0x10044bc6
mov eax, dword [ebx]
mov ecx, str.ProgramFilesFolder
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x10044dba
test dx, dx
je 0x10044db6
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10044dba
add eax, 4
add ecx, 4
test dx, dx
jne 0x10044d94
xor eax, eax
jmp 0x10044dbf
sbb eax, eax
or eax, 1
test eax, eax
je 0x10044e08
mov ecx, ebx
call fcn.10044f40
test al, al
jne 0x10044e08
mov eax, dword [ebx]
mov ecx, str.AppDataFolder
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x10044dfb
test dx, dx
je 0x10044df7
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10044dfb
add eax, 4
add ecx, 4
test dx, dx
jne 0x10044dd5
xor eax, eax
jmp 0x10044e00
sbb eax, eax
or eax, 1
test eax, eax
jne 0x10044bc6
mov eax, dword [ebx]
mov ecx, str.AppDataFolder
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x10044e36
test dx, dx
je 0x10044e32
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10044e36
add eax, 4
add ecx, 4
test dx, dx
jne 0x10044e10
xor ecx, ecx
jmp 0x10044e3b
sbb ecx, ecx
or ecx, 1
xor eax, eax
mov edx, str.PROGRAMFILES
mov word [ebp + 0x238], ax
test ecx, ecx
push 0x104
lea eax, [ebp + 0x238]
push eax
mov eax, str.APPDATA
cmovne eax, edx
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov esi, eax
test esi, esi
je 0x10044e7a
mov eax, 0x5c
mov word [ebp + esi*2 + 0x238], ax
inc esi
lea eax, [esi + esi]
cmp eax, 0x208
jae 0x10044f30
xor ecx, ecx
mov word [ebp + eax + 0x238], cx
cmp word [ebp + 0x238], cx
je 0x10044ec2
lea ecx, [ebp + 0x238]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10044ea4
sub ecx, edx
lea eax, [ebp + 0x238]
sar ecx, 1
push ecx
push eax
mov ecx, ebx
call fcn.1003f950
test esi, esi
setne al
jmp 0x10044571
lea eax, [ebp + 0x440]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
mov esi, eax
mov dword [ebp - 0x18], 0
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
mov ecx, dword [ebp - 0x18]
push dword [ebp - 0x1c]
push ecx
mov edx, dword [ecx]
call dword [edx + 0x14]
test esi, esi
je 0x10044bc6
lea ecx, [ebp + 0x440]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10044f10
lea eax, [ebp + 0x440]
jmp 0x10044d5e
push 0x80004005
call fcn.100374f0
call fcn.10076a06
int3