Function at 0x521fc0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5a39bc
mov eax, dword fs:[0]
push eax
sub esp, 0x920
mov eax, dword [0x5f13cc]
xor eax, esp
mov dword [esp + 0x918], eax
push ebx
push esi
push edi
mov eax, dword [0x5f13cc]
xor eax, esp
push eax
lea eax, [esp + 0x930]
mov dword fs:[0], eax
xor ebx, ebx
xor eax, eax
cmp ecx, ebx
mov edi, edx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x18], eax
je 0x522645
mov eax, edi
lea edx, [eax + 2]
jmp 0x522020
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x522020
sub eax, edx
sar eax, 1
push 0x208
mov esi, eax
lea eax, [esp + 0x518]
push ebx
push eax
call fcn.00580260
add esp, 0xc
cmp edi, ebx
je 0x52212c
cmp esi, 1
mov cx, word [edi + 2]
mov word [esp + 0x16], bx
mov word [esp + 0x14], cx
je 0x5220a3
mov ecx, 0x5ca69c
lea eax, [esp + 0x14]
jmp 0x522070
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x522096
cmp dx, bx
je 0x522092
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x522096
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x522070
xor eax, eax
jmp 0x52209b
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x52212c
lea edx, [esp + 0x304]
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, bx
jne 0x5220c0
sub eax, edx
sar eax, 1
mov ecx, 0x103
sub ecx, eax
push ecx
lea edx, [esp + 0x308]
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, bx
jne 0x522100
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, bx
jne 0x522136
sub eax, edx
sar eax, 1
mov ecx, 0x103
sub ecx, eax
push ecx
lea edx, [esp + 0x518]
push edi
push edx
call fcn.0057fe46
mov edi, dword [esp + 0x58]
mov eax, edi
add esp, 0xc
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x522167
sub eax, edx
sar eax, 1
push 0x208
mov esi, eax
lea eax, [esp + 0x720]
push ebx
push eax
call fcn.00580260
mov cx, word [edi + 2]
add esp, 0xc
cmp esi, 1
mov word [esp + 0x16], bx
mov word [esp + 0x14], cx
je 0x5221e3
mov ecx, 0x5ca69c
lea eax, [esp + 0x14]
lea ebx, [ebx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x5221d6
cmp dx, bx
je 0x5221d2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x5221d6
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x5221b0
xor eax, eax
jmp 0x5221db
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x52226c
lea edx, [esp + 0x304]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [esp + 0x71c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x522200
sub eax, edx
sar eax, 1
mov ecx, 0x103
sub ecx, eax
push ecx
lea edx, [esp + 0x308]
push edx
lea eax, [esp + 0x724]
push eax
call fcn.0057fe46
lea eax, [esp + 0x728]
add esp, 0xc
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x522240
sub eax, edx
sar eax, 1
mov ecx, 0x103
sub ecx, eax
push ecx
lea edx, [esp + 0x720]
push 0x5bd0e8
push edx
call fcn.0057fe46
add esp, 0xc
lea eax, [esp + 0x71c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x522276
sub eax, edx
sar eax, 1
mov ecx, 0x103
sub ecx, eax
push ecx
lea edx, [esp + 0x720]
push edi
push edx
call fcn.0057fe46
add esp, 0xc
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x518]
call fcn.00404460
lea ecx, [esp + 0x50]
push ecx
lea ecx, [esp + 0x720]
mov dword [esp + 0x93c], ebx
call fcn.00404460
lea edx, [esp + 0x40]
push edx
mov byte [esp + 0x93c], 1
call fcn.00526be0
lea eax, [esp + 0x40]
push eax
lea edx, [esp + 0x518]
mov byte [esp + 0x93c], 2
call fcn.00526cd0
lea esi, [esp + 0x9c]
call fcn.005231b0
lea ecx, [esp + 0x40]
mov edx, esi
push ecx
push edx
lea esi, [esp + 0x51c]
mov byte [esp + 0x940], 3
call fcn.005232b0
mov eax, dword [0x5fcd20]
mov edx, dword [eax + 0xc]
mov ecx, 0x5fcd20
mov dword [esp + 0x2c], vtable.CWindowsFile.0
call edx
add eax, 0x10
mov dword [esp + 0x38], eax
mov eax, dword [0x5fcd20]
mov edx, dword [eax + 0xc]
mov ecx, 0x5fcd20
call edx
add eax, 0x10
mov dword [esp + 0x3c], eax
mov dword [esp + 0x34], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], 1
mov dword [esp + 0x28], ebx
lea eax, [esp + 0x6c]
push eax
mov byte [esp + 0x93c], 5
call fcn.00524220
push ebx
lea ecx, [esp + 0x720]
lea esi, [esp + 0x70]
mov byte [esp + 0x93c], 6
call fcn.00524560
lea ecx, [esp + 0x9c]
call fcn.00523310
cmp eax, 0x80004005
je 0x52255e
mov edi, vtable.CSSFiles.0
lea ecx, [ecx]
cmp dword [esp + 0xa8], ebx
jne 0x5223d8
cmp dword [esp + 0x2fc], 0xffffffff
je 0x5223d8
xor eax, eax
cmp dword [esp + 0xac], 0x10
sete al
cmp eax, ebx
jne 0x522547
push 0x208
lea ecx, [esp + 0x30a]
push ebx
push ecx
mov word [esp + 0x310], bx
call fcn.00580260
add esp, 0xc
lea edx, [esp + 0x304]
push edx
lea ecx, [esp + 0xa0]
call fcn.00523650
lea eax, [esp + 0x2c]
push eax
push ebx
lea ecx, [esp + 0x48]
push ecx
lea ecx, [esp + 0x310]
call fcn.00526d50
cmp eax, ebx
jne 0x522547
mov eax, dword [esp + 0x2c]
lea edx, [esp + 0x14]
push edx
mov edx, dword [eax + 0x24]
lea ecx, [esp + 0x30]
mov dword [esp + 0x18], ebx
call edx
test eax, eax
jl 0x522520
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x2c]
lea eax, [esp + 0x1c]
push eax
mov eax, dword [edx + 0x28]
push ecx
lea ecx, [esp + 0x34]
call eax
cmp eax, ebx
jne 0x522520
push 0x20a
lea ecx, [esp + 0x308]
push ebx
push ecx
call fcn.00580260
add esp, 0xc
lea edx, [esp + 0x304]
push edx
lea ecx, [esp + 0xa0]
call fcn.00523540
mov eax, dword [0x5fcd20]
mov edx, dword [eax + 0xc]
mov ecx, 0x5fcd20
mov dword [esp + 0x58], edi
call edx
add eax, 0x10
mov dword [esp + 0x64], eax
mov eax, dword [0x5fcd20]
mov edx, dword [eax + 0xc]
mov ecx, 0x5fcd20
call edx
add eax, 0x10
mov dword [esp + 0x68], eax
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], ebx
lea eax, [esp + 0x58]
push eax
push 0x1001
lea ecx, [esp + 0x74]
push ecx
lea ecx, [esp + 0x310]
mov byte [esp + 0x944], 7
call fcn.005246a0
cmp eax, ebx
jne 0x52250e
lea edx, [esp + 0x1c]
push edx
lea ecx, [esp + 0x5c]
mov dword [esp + 0x1c], 1
call fcn.005269d0
lea ecx, [esp + 0x58]
call fcn.005265d0
lea eax, [esp + 0x58]
push eax
mov byte [esp + 0x93c], 6
call fcn.005262f0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov eax, dword [esp + 0x34]
cmp eax, 0xffffffff
je 0x522536
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea esi, [esp + 0x38]
mov dword [esp + 0x34], 0xffffffff
call fcn.00403f60
lea ecx, [esp + 0x9c]
call fcn.00523310
cmp eax, 0x80004005
jne 0x5223b0
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x52256f
push eax
call fcn.00578327
add esp, 4
lea ecx, [esp + 0x6c]
push ecx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x93c], 5
call fcn.005242d0
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x52259e
push eax
call fcn.00578327
add esp, 4
lea ecx, [esp + 0x2c]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x28], ebx
call fcn.00527050
lea ecx, [esp + 0x9c]
call fcn.00523260
mov byte [esp + 0x938], 1
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
mov dword [esp + 0x40], vtable.CWindowsFileSystem.0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x5225ef
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x938], bl
mov eax, dword [esp + 0x50]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x522616
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x938], 0xffffffff
mov eax, dword [esp + 0x54]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x522641
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x930]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x918]
xor ecx, esp
call fcn.005787fd
mov esp, ebp
pop ebp
ret