Function at 0x522be0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
lea eax, [ebp - 0x220]
lea ebx, [ebp - 0x22c]
sub esp, 0x24c
mov dword [ebp - 0x22c], 0x880f80
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov dword [esp + 4], eax
mov dword [esp], 0x104
call edi
sub esp, 8
test eax, eax
mov esi, eax
je 0x522cbe
cmp eax, 0x104
jbe 0x522d80
cmp eax, 0x3ffffffe
ja 0x522ebd
lea eax, [eax + eax]
mov dword [esp], eax
call fcn.00708210
mov dword [ebp - 0x23c], eax
mov dword [esp + 4], eax
mov dword [esp], 0x104
call edi
sub esp, 8
test eax, eax
je 0x522cb0
mov ecx, dword [ebp - 0x23c]
lea eax, [ebp - 0x228]
mov dword [esp + 8], esi
lea ebx, [ebp - 0x22c]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.005b01a0
mov eax, dword [ebp - 0x22c]
mov edx, dword [ebp - 0x228]
mov dword [ebp - 0x228], eax
mov dword [ebp - 0x22c], edx
mov edx, dword [eax]
test edx, edx
je 0x522e80
cmp edx, 0xffffffff
je 0x522cb0
lock sub dword [eax], 1
je 0x522e80
mov eax, dword [ebp - 0x23c]
mov dword [esp], eax
call fcn.006fca80
mov esi, dword [ebp - 0x22c]
lea ebx, [ebp - 0x22c]
cmp dword [esi + 4], 1
jle 0x522d19
mov eax, dword [esi]
lea ebx, [ebp - 0x22c]
cmp eax, 1
ja 0x522ce3
cmp dword [esi + 0xc], 0x10
je 0x522d04
mov dword [esp + 4], 0
mov eax, dword [esi + 4]
mov ecx, ebx
add eax, 1
mov dword [esp], eax
call fcn.005ab710
mov esi, dword [ebp - 0x22c]
sub esp, 8
cmp dword [esi + 4], 1
jle 0x522d19
mov eax, dword [esi + 0xc]
cmp word [esi + eax + 2], 0x3a
je 0x522e00
mov ecx, dword [ebp + 8]
mov byte [esp + 4], 0
mov dword [esp], ebx
call fcn.0050fe80
mov esi, dword [ebp - 0x22c]
sub esp, 8
mov eax, dword [esi]
test eax, eax
je 0x522d54
cmp eax, 0xffffffff
je 0x522d49
lock sub dword [esi], 1
mov esi, dword [ebp - 0x22c]
je 0x522d54
mov eax, dword [ebp + 8]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], esi
mov dword [esp + 8], 4
mov dword [esp + 4], 2
call fcn.004a4c50
mov eax, dword [ebp + 8]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebp - 0x224]
lea edx, [ebp - 0x220]
mov dword [esp + 8], esi
lea ebx, [ebp - 0x22c]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.005b01a0
mov eax, dword [ebp - 0x22c]
mov edx, dword [ebp - 0x224]
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x22c], edx
mov edx, dword [eax]
test edx, edx
je 0x522dd3
cmp edx, 0xffffffff
je 0x522cbe
lock sub dword [eax], 1
jne 0x522cbe
mov eax, dword [ebp - 0x224]
mov dword [esp + 8], 4
mov dword [esp + 4], 2
mov dword [esp], eax
call fcn.004a4c50
jmp 0x522cbe
movzx eax, word [esi + eax]
call fcn.0058ea50
mov edi, eax
mov eax, dword [esi]
cmp eax, 1
ja 0x522e18
cmp dword [esi + 0xc], 0x10
je 0x522e39
mov dword [esp + 4], 0
mov eax, dword [esi + 4]
mov ecx, ebx
add eax, 1
mov dword [esp], eax
call fcn.005ab710
mov esi, dword [ebp - 0x22c]
sub esp, 8
mov edx, dword [esi + 4]
test edx, edx
jle 0x522ea3
mov eax, dword [esi]
cmp eax, 1
ja 0x522e51
mov edx, dword [esi + 0xc]
mov eax, esi
cmp edx, 0x10
je 0x522e75
mov dword [esp + 4], 0
mov eax, dword [esi + 4]
mov ecx, ebx
add eax, 1
mov dword [esp], eax
call fcn.005ab710
mov eax, dword [ebp - 0x22c]
sub esp, 8
mov edx, dword [eax + 0xc]
mov word [eax + edx], di
jmp 0x522d19
mov eax, dword [ebp - 0x228]
mov dword [esp + 8], 4
mov dword [esp + 4], 2
mov dword [esp], eax
call fcn.004a4c50
jmp 0x522cb0
mov eax, 0x20
mov dword [esp], 1
mov ecx, ebx
mov word [esp + 4], ax
call fcn.005add80
jmp 0x522e69
lea ebx, [ebp - 0x22c]
call fcn.0070bce0
mov esi, eax
mov ecx, ebx
call fcn.005b1050
mov dword [esp], esi
call fcn.0044a8f0
nop
nop
nop
nop
nop
nop
nop