Function at 0x1002aa10
Capabilities:
Check if file exists
Get common file path
Get file attributes
Set current directory

Disassembly:
push 0xffffffffffffffff
push 0x10188b0c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x214
mov eax, dword [0x1019175c]
push ebx
push ebp
push esi
push edi
xor ebx, ebx
xor ebp, ebp
mov dword [esp + 0x10], eax
push ebx
mov dword [esp + 0x230], ebx
call fcn.1002c380
mov esi, eax
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x22]
mov word [esp + 0x20], bx
add esp, 4
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x1c]
push ecx
push 0x103
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
cmp esi, ebx
jne 0x1002ab6d
mov edx, dword [0x101f1cf8]
lea eax, [esp + 0x18]
push edx
push eax
call fcn.10012380
add esp, 8
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x10]
push ecx
push str._sDWM
push edx
mov byte [esp + 0x238], 1
call fcn.100366e0
mov eax, dword [esp + 0x1c]
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1002ab5d
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x1c]
push edx
mov esi, dword [ecx - 8]
call fcn.100547f0
add esp, 4
cmp esi, eax
jne 0x1002aaef
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x1c]
push eax
push ecx
call fcn.10055d2e
add esp, 8
cmp eax, ebx
je 0x1002aafc
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ebp, eax
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
call fcn.10032d60
push 0x101ae4fc
lea ecx, [esp + 0x18]
mov byte [esp + 0x230], 2
call fcn.100343b0
push str.TWaterMask32.dll
lea ecx, [esp + 0x18]
call fcn.100343b0
mov ecx, dword [esp + 0x14]
push ecx
call fcn.1002c380
add esp, 4
cmp ebp, ebx
mov esi, eax
je 0x1002ab4c
lea edx, [esp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea ecx, [esp + 0x14]
mov byte [esp + 0x22c], 1
call fcn.10033760
lea ecx, [esp + 0x18]
mov byte [esp + 0x22c], bl
call fcn.10033760
xor edi, edi
cmp esi, ebx
jne 0x1002ac3f
call fcn.10010810
mov ebp, eax
cmp ebp, ebx
je 0x1002ac74
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1002ac74
push ebp
lea ecx, [esp + 0x14]
call fcn.10033ac0
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x1c]
push ecx
mov esi, dword [eax - 8]
call fcn.100547f0
add esp, 4
cmp eax, esi
jne 0x1002abce
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x1c]
push edx
push eax
call fcn.10055d2e
add esp, 8
cmp eax, ebx
je 0x1002abdb
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov edi, eax
lea edx, [esp + 0x10]
lea ecx, [esp + 0x14]
push edx
call fcn.10032d60
push 0x101ae4fc
lea ecx, [esp + 0x18]
mov byte [esp + 0x230], 3
call fcn.100343b0
push str.TWaterMask32.dll
lea ecx, [esp + 0x18]
call fcn.100343b0
mov eax, dword [esp + 0x14]
push eax
call fcn.1002c380
add esp, 4
cmp edi, ebx
mov esi, eax
je 0x1002ac2b
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea ecx, [esp + 0x14]
mov byte [esp + 0x22c], bl
call fcn.10033760
cmp esi, ebx
je 0x1002ac74
call fcn.10010890
push eax
call fcn.1002d5a0
add esp, 4
call fcn.1002d0d0
cmp dword [0x101f1d98], ebx
je 0x1002ac74
push eax
push str.CDocWaterMarkMgr::Init_TWMRegisterDocProperty__08x_
push 0x101b3304
push 0xffffffffffffffff
push 0x101f1d2c
call fcn.100066b0
add esp, 0x14
cmp dword [0x101f1d98], ebx
je 0x1002ac96
push esi
push 0x101b5364
push 0x101b3304
push 0xffffffffffffffff
push 0x101f1d2c
call fcn.100066b0
add esp, 0x14
lea ecx, [esp + 0x10]
mov dword [esp + 0x22c], 0xffffffff
call fcn.10033760
mov ecx, dword [esp + 0x224]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x220
ret