Function at 0x404750
Capabilities:
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x314]
sub esp, 0x314
push 0xffffffffffffffff
push 0x4418e3
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x45878c]
xor eax, ebp
mov dword [ebp + 0x310], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x31c]
mov esi, dword [ebp + 0x324]
mov dword [ebp - 0x18], eax
xor ebx, ebx
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], ebx
call fcn.00418a0e
mov edi, dword [ebp + 0x320]
push ebx
push 2
push edi
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 1
call fcn.00418e7a
test eax, eax
jne 0x404805
push 0x10
push 0x445ad8
mov ecx, esi
call fcn.00401740
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], bl
call fcn.00418b0a
lea eax, [edi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4047fb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
jmp 0x404a09
mov dword [ebp - 0x14], ebx
call fcn.0041068e
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x404822
push 0x80004005
call fcn.00401150
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 2
call fcn.0041068e
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40484f
push 0x80004005
call fcn.00401150
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x30], eax
mov byte [ebp - 4], 3
call dword [0x459b94]
push 0x104
lea ecx, [ebp + 0x20c]
push ebx
push ecx
mov dword [ebp - 0x1c], eax
call fcn.0042d490
add esp, 0xc
push 0x104
lea edx, [ebp + 0x20c]
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 4
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x2c]
call fcn.0041871c
cmp dword [ebp - 0x14], 0
jbe 0x40498a
lea ebx, [ebx]
push 0x20c
lea ecx, [ebp]
push 0
push ecx
call fcn.0042d490
add esp, 0xc
push 0x20c
lea edx, [ebp]
push edx
lea ecx, [ebp - 0x2c]
call fcn.0041871c
lea eax, [ebp]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
cmp eax, 0x3fffffff
jg 0x40491b
lea edi, [eax + eax]
mov eax, edi
call fcn.0042da10
mov esi, esp
test esi, esi
je 0x40491b
mov edx, dword [ebp - 0x1c]
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
lea ecx, [ebp]
push ecx
push 0
push edx
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, esi
jmp 0x40491d
xor eax, eax
test eax, eax
jne 0x404925
xor ecx, ecx
jmp 0x40493b
mov ecx, eax
lea esi, [ecx + 1]
lea ebx, [ebx]
mov dl, byte [ecx]
add ecx, 1
test dl, dl
jne 0x404930
sub ecx, esi
push ecx
push eax
lea ecx, [ebp - 0x10]
call fcn.00401740
lea eax, [ebp + 0x20c]
push eax
push str._systemroot
lea ecx, [ebp - 0x10]
call fcn.00402290
lea ecx, [ebp - 0x10]
push ecx
mov ecx, dword [ebp - 0x18]
call fcn.00403a60
mov edx, dword [ebp + 0x208]
push 1
push 0
push edx
lea ecx, [ebp - 0x2c]
call fcn.004187a7
add ebx, 1
cmp ebx, dword [ebp - 0x14]
jb 0x4048b0
mov edi, dword [ebp + 0x320]
lea ecx, [ebp - 0x2c]
call fcn.004189ac
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4049b5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4049d8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0
call fcn.00418b0a
lea eax, [edi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404a07
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
lea esp, [ebp - 0x40]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x310]
xor ecx, ebp
call fcn.0042d47b
add ebp, 0x314
mov esp, ebp
pop ebp
ret 0xc