Function at 0x524e30
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push 0xffffffffffffffff
push 0x5a0518
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5f13cc]
xor eax, esp
push eax
lea eax, [esp + 0x1c]
mov dword fs:[0], eax
mov esi, ecx
cmp dword [esi + 4], 0
lea edi, [esi + 4]
je 0x524e6c
mov eax, 1
jmp 0x525073
cmp dword [esp + 0x2c], 0
je 0x524e8d
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x525052
test al, 0x10
jne 0x525052
mov eax, dword [esi]
push ecx
sub eax, 0x10
mov dword [esp + 0x30], esp
mov ebp, esp
call fcn.00403ce0
add eax, 0x10
mov dword [ebp], eax
lea eax, [esp + 0x30]
push eax
call fcn.00527db0
mov dword [esp + 0x2c], 0
mov eax, dword [eax]
push eax
call fcn.005278e0
add esp, 0xc
test eax, eax
mov dword [esp + 0x24], 0xffffffff
mov eax, dword [esp + 0x2c]
sete bl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x524eee
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
jne 0x525052
mov eax, dword [esi + 0x20]
xor ecx, ecx
cmp eax, ecx
je 0x524f12
mov ebp, 0x20
mov dword [esp + 0x18], 0x1002
mov dword [esp + 0x2c], ebp
jmp 0x524f26
mov dword [esp + 0x2c], 0x12
mov ebp, dword [esp + 0x2c]
mov dword [esp + 0x18], 0x1012
cmp eax, ecx
je 0x524fc7
cmp dword [esi + 0x24], ecx
je 0x524fc7
mov eax, dword [esi]
push ecx
sub eax, 0x10
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x18], esp
mov ebx, esp
call fcn.00403ce0
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x34]
add eax, 0x10
push edx
mov dword [ebx], eax
call fcn.00524cc0
add esp, 0xc
test eax, eax
je 0x52506c
mov eax, dword [esi + 0x2c]
add esi, 0x2c
test eax, eax
je 0x524f87
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esi], 0
mov eax, dword [edi]
test eax, eax
je 0x524f9b
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [edi], 0
mov eax, dword [esp + 0x2c]
push esi
push 1
push eax
call dword [sym.imp.ole32.dll_CreateILockBytesOnHGlobal]
mov esi, dword [esi]
test esi, esi
je 0x52506c
push edi
push 0
push 0
push ebp
push 0
push esi
call dword [sym.imp.ole32.dll_StgOpenStorageOnILockBytes]
jmp 0x52506c
mov eax, dword [esi]
mov ebx, dword [sym.imp.ole32.dll_StgOpenStorage]
push edi
push ecx
push ecx
push ebp
push ecx
push eax
call ebx
cmp dword [edi], 0
mov ebp, eax
jne 0x52506c
cmp dword [esi + 0x20], 0
jne 0x525056
mov eax, esi
call fcn.00524ca0
test eax, eax
je 0x525056
cmp ebp, 0x80030005
je 0x52500b
cmp ebp, 0x80030020
je 0x52500b
cmp ebp, 0x80030021
jne 0x525056
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [esp + 0x14], 0
lea esp, [esp]
push 0xc8
call ebp
mov ecx, dword [esp + 0x2c]
mov edx, dword [esi]
push edi
push 0
push 0
push ecx
push 0
push edx
call ebx
cmp dword [edi], 0
jne 0x52506c
mov eax, dword [esp + 0x14]
add eax, 1
cmp eax, 5
mov dword [esp + 0x14], eax
jl 0x525020
cmp dword [edi], 0
jne 0x52506c
xor eax, eax
jmp 0x525073
cmp dword [edi], 0
jne 0x52506c
mov eax, dword [esp + 0x18]
mov ecx, dword [esi]
push edi
push 0
push eax
push ecx
call dword [sym.imp.ole32.dll_StgCreateDocfile]
xor eax, eax
cmp dword [edi], eax
setne al
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 4