Function at 0x522670
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x5a3926
mov eax, dword fs:[0]
push eax
sub esp, 0x710
mov eax, dword [0x5f13cc]
xor eax, esp
mov dword [esp + 0x708], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5f13cc]
xor eax, esp
push eax
lea eax, [esp + 0x724]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x734]
xor edi, edi
xor eax, eax
cmp ebp, edi
mov ebx, ecx
mov dword [esp + 0x1c], eax
je 0x522cca
mov eax, ebx
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x5226d0
sub eax, edx
sar eax, 1
push 0x208
mov esi, eax
lea eax, [esp + 0x518]
push edi
push eax
call fcn.00580260
add esp, 0xc
cmp ebx, edi
je 0x5227dc
cmp esi, 1
mov cx, word [ebx + 2]
mov word [esp + 0x1a], di
mov word [esp + 0x18], cx
je 0x522753
mov ecx, 0x5ca69c
lea eax, [esp + 0x18]
jmp 0x522720
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x522746
cmp dx, di
je 0x522742
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x522746
add eax, 4
add ecx, 4
cmp dx, di
jne 0x522720
xor eax, eax
jmp 0x52274b
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, edi
je 0x5227dc
lea edx, [esp + 0xfc]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [esp + 0x514]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x522770
sub eax, edx
sar eax, 1
mov ecx, 0x103
sub ecx, eax
push ecx
lea edx, [esp + 0x100]
push edx
lea eax, [esp + 0x51c]
push eax
call fcn.0057fe46
lea eax, [esp + 0x520]
add esp, 0xc
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x5227b0
sub eax, edx
sar eax, 1
mov ecx, 0x103
sub ecx, eax
push ecx
lea edx, [esp + 0x518]
push 0x5bd0e8
push edx
call fcn.0057fe46
add esp, 0xc
lea eax, [esp + 0x514]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x5227e6
sub eax, edx
sar eax, 1
mov ecx, 0x103
sub ecx, eax
push ecx
lea edx, [esp + 0x518]
push ebx
push edx
call fcn.0057fe46
mov eax, ebp
add esp, 0xc
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x522813
sub eax, edx
sar eax, 1
push 0x208
mov esi, eax
lea eax, [esp + 0x310]
push edi
push eax
call fcn.00580260
mov cx, word [ebp + 2]
add esp, 0xc
cmp esi, 1
mov word [esp + 0x1a], di
mov word [esp + 0x18], cx
je 0x522889
mov ecx, 0x5ca69c
lea eax, [esp + 0x18]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x52287c
cmp dx, di
je 0x522878
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x52287c
add eax, 4
add ecx, 4
cmp dx, di
jne 0x522856
xor eax, eax
jmp 0x522881
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, edi
je 0x52290c
lea edx, [esp + 0xfc]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [esp + 0x30c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x5228a6
sub eax, edx
sar eax, 1
mov ecx, 0x103
sub ecx, eax
push ecx
lea edx, [esp + 0x100]
push edx
lea eax, [esp + 0x314]
push eax
call fcn.0057fe46
lea eax, [esp + 0x318]
add esp, 0xc
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x5228e0
sub eax, edx
sar eax, 1
mov ecx, 0x103
sub ecx, eax
push ecx
lea edx, [esp + 0x310]
push 0x5bd0e8
push edx
call fcn.0057fe46
add esp, 0xc
lea eax, [esp + 0x30c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x522916
sub eax, edx
sar eax, 1
mov ecx, 0x103
sub ecx, eax
push ecx
lea edx, [esp + 0x310]
push ebp
push edx
call fcn.0057fe46
add esp, 0xc
lea eax, [esp + 0x58]
push eax
call fcn.00526be0
lea ecx, [esp + 0x58]
push ecx
lea edx, [esp + 0x518]
mov dword [esp + 0x730], edi
call fcn.00526cd0
lea edx, [esp + 0x64]
push edx
call fcn.00524220
push edi
lea ecx, [esp + 0x310]
lea esi, [esp + 0x68]
mov byte [esp + 0x730], 1
call fcn.00524560
mov eax, dword [0x5fcd20]
mov edx, dword [eax + 0xc]
mov ecx, 0x5fcd20
mov dword [esp + 0x94], vtable.CSSEnum.0
mov dword [esp + 0xa4], edi
call edx
add eax, 0x10
push 0x48
mov dword [esp + 0xb0], eax
lea eax, [esp + 0xb8]
push edi
push eax
mov dword [esp + 0xac], edi
mov dword [esp + 0xb4], edi
call fcn.00580260
add esp, 0xc
mov ecx, esi
mov byte [esp + 0x72c], 2
push 0x5bcc3c
xor ebx, ebx
lea eax, [esp + 0xb0]
mov dword [esp + 0xa0], ecx
call fcn.00404050
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], 1
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x72c], 3
mov edx, dword [0x5fcd20]
mov eax, dword [edx + 0xc]
mov ecx, 0x5fcd20
mov dword [esp + 0x30], vtable.CSSFiles.0
call eax
mov edx, dword [0x5fcd20]
add eax, 0x10
mov dword [esp + 0x3c], eax
mov eax, dword [edx + 0xc]
mov ecx, 0x5fcd20
call eax
add eax, 0x10
mov dword [esp + 0x40], eax
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
lea esi, [esp + 0x94]
mov byte [esp + 0x72c], 4
call fcn.005239c0
cmp eax, 0x80004005
je 0x522c22
mov edi, 0x105
mov ebp, vtable.CWindowsFile.0
cmp dword [esp + 0xa8], ebx
jne 0x522a9d
cmp dword [esp + 0xa4], ebx
je 0x522a9d
xor eax, eax
cmp dword [esp + 0xb8], 1
sete al
cmp eax, ebx
jne 0x522c0b
push 0x208
lea ecx, [esp + 0x102]
push ebx
push ecx
mov word [esp + 0x108], bx
call fcn.00580260
add esp, 0xc
lea edx, [esp + 0x18]
push edx
lea ebx, [esp + 0x100]
lea ecx, [esp + 0x98]
mov dword [esp + 0x1c], edi
call fcn.00523bd0
lea eax, [esp + 0x30]
push eax
push 0
lea ecx, [esp + 0x6c]
push ecx
mov ecx, ebx
call fcn.005246a0
test eax, eax
jne 0x522c09
mov eax, dword [esp + 0x30]
lea edx, [esp + 0x18]
push edx
mov edx, dword [eax + 0x24]
xor esi, esi
lea ecx, [esp + 0x34]
mov dword [esp + 0x1c], esi
call edx
test eax, eax
jl 0x522c00
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x30]
lea eax, [esp + 0x20]
push eax
mov eax, dword [edx + 0x28]
push ecx
lea ecx, [esp + 0x38]
call eax
cmp eax, esi
jne 0x522c00
push 0x20a
mov ecx, ebx
push esi
push ecx
call fcn.00580260
add esp, 0xc
lea edx, [esp + 0x18]
push edx
mov eax, ebx
push eax
lea ecx, [esp + 0x9c]
mov dword [esp + 0x20], edi
call fcn.00523aa0
mov edx, dword [0x5fcd20]
mov eax, dword [edx + 0xc]
mov ecx, 0x5fcd20
mov dword [esp + 0x44], ebp
call eax
mov edx, dword [0x5fcd20]
add eax, 0x10
mov dword [esp + 0x50], eax
mov eax, dword [edx + 0xc]
mov ecx, 0x5fcd20
call eax
add eax, 0x10
mov dword [esp + 0x54], eax
mov dword [esp + 0x4c], esi
lea ecx, [esp + 0x44]
push ecx
push 0x1001
lea edx, [esp + 0x60]
push edx
mov ecx, ebx
mov byte [esp + 0x738], 5
call fcn.00526d50
cmp eax, esi
jne 0x522bef
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x48]
mov dword [esp + 0x20], 1
call fcn.00527700
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov eax, dword [esp + 0x4c]
cmp eax, 0xffffffff
je 0x522bde
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea esi, [esp + 0x50]
mov dword [esp + 0x4c], 0xffffffff
call fcn.00403f60
lea ecx, [esp + 0x44]
mov byte [esp + 0x72c], 4
call fcn.00527050
lea ecx, [esp + 0x30]
call fcn.005265d0
xor ebx, ebx
lea esi, [esp + 0x94]
call fcn.005239c0
cmp eax, 0x80004005
jne 0x522a76
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x522c33
push eax
call fcn.00578327
add esp, 4
lea ecx, [esp + 0x30]
push ecx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x30], ebx
mov byte [esp + 0x730], 3
call fcn.005262f0
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x522c62
push eax
call fcn.00578327
add esp, 4
lea ecx, [esp + 0x94]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x72c], 1
call fcn.005238c0
lea edx, [esp + 0x64]
push edx
mov byte [esp + 0x730], bl
call fcn.005242d0
mov dword [esp + 0x72c], 0xffffffff
mov eax, dword [esp + 0x5c]
add eax, 0xfffffff0
mov dword [esp + 0x58], vtable.CWindowsFileSystem.0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x522cc6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x724]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x708]
xor ecx, esp
call fcn.005787fd
add esp, 0x71c
ret