Function at 0x40cef0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4492bc
mov eax, dword fs:[0]
push eax
sub esp, 0x498
mov eax, dword [0x45c2c0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x440]
xor ebx, ebx
push edx
mov dword [ebp - 0x498], eax
mov dword [ebp - 0x4a4], ecx
mov dword [ebp - 0x49c], ebx
mov dword [eax + 4], edi
call fcn.0040cd50
add esp, 4
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x430]
cmp eax, ebx
je 0x40cf85
cmp dword [ebp - 0x42c], 8
mov ecx, dword [ebp - 0x440]
jae 0x40cf6b
lea ecx, [ebp - 0x440]
cmp word [ecx + eax*2 - 2], 0x5c
je 0x40cf85
push 1
push 0x452af4
lea ecx, [ebp - 0x440]
call fcn.0040d2e0
push 0x10
push str.SpreadsheetTools
lea ecx, [ebp - 0x440]
call fcn.0040d2e0
cmp dword [ebp - 0x42c], 8
mov eax, dword [ebp - 0x440]
jae 0x40cfac
lea eax, [ebp - 0x440]
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call esi
cmp eax, 0xffffffff
jne 0x40cfd7
cmp dword [ebp - 0x42c], 8
mov eax, dword [ebp - 0x440]
jae 0x40cfcf
lea eax, [ebp - 0x440]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0xc
push str.Runtime.dll
lea ecx, [ebp - 0x440]
call fcn.0040d2e0
cmp dword [ebp - 0x42c], 8
mov eax, dword [ebp - 0x440]
jae 0x40cffe
lea eax, [ebp - 0x440]
push eax
call esi
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov esi, ecx
cmp edi, ebx
je 0x40d017
cmp esi, ebx
je 0x40d294
push 0x208
lea edx, [ebp - 0x424]
push ebx
push edx
call fcn.0042c2b0
mov eax, dword [ebp - 0x440]
add esp, 0xc
cmp dword [ebp - 0x42c], 8
jae 0x40d041
lea eax, [ebp - 0x440]
lea edx, [ebp - 0x424]
sub edx, eax
lea esp, [esp]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, bx
jne 0x40d050
cmp esi, ebx
je 0x40d092
mov esi, dword [ebp - 0x498]
mov eax, 0x10
cmp dword [esi + 4], ebx
jne 0x40d078
mov eax, 0x12
push esi
push 0x452ab8
push ebx
push ebx
push ebx
push ebx
push eax
lea eax, [ebp - 0x424]
push eax
call dword [sym.imp.ole32.dll_StgOpenStorageEx]
jmp 0x40d0ba
mov ecx, dword [ebp - 0x498]
push ecx
push 0x452ab8
push ebx
push ebx
push ebx
push ebx
push 0x1012
lea edx, [ebp - 0x424]
push edx
call dword [sym.imp.ole32.dll_StgCreateStorageEx]
mov esi, dword [ebp - 0x498]
cmp eax, ebx
jl 0x40d294
xor eax, eax
cmp dword [esi + 4], ebx
push 0x208
sete al
lea ecx, [ebp - 0x21c]
push ebx
push ecx
lea eax, [eax + eax + 0x10]
mov dword [ebp - 0x4a0], eax
call fcn.0042c2b0
mov ecx, dword [ebp - 0x4a4]
add ecx, 2
add esp, 0xc
mov edi, 7
xor edx, edx
mov eax, ecx
mov dword [ebp - 0x448], edi
mov dword [ebp - 0x44c], ebx
mov word [ebp - 0x45c], dx
lea esi, [eax + 2]
mov dx, word [eax]
add eax, 2
cmp dx, bx
jne 0x40d111
sub eax, esi
sar eax, 1
push eax
push ecx
lea ecx, [ebp - 0x45c]
call fcn.00408e00
mov byte [ebp - 4], 1
push ebx
xor eax, eax
push 0x453804
lea ecx, [ebp - 0x494]
mov dword [ebp - 0x480], edi
mov dword [ebp - 0x484], ebx
mov word [ebp - 0x494], ax
call fcn.00408e00
mov byte [ebp - 4], 2
xor ecx, ecx
push 1
mov word [ebp - 0x478], cx
push 0x453b8c
lea ecx, [ebp - 0x478]
mov dword [ebp - 0x464], edi
mov dword [ebp - 0x468], ebx
call fcn.00408e00
lea edx, [ebp - 0x494]
push edx
lea eax, [ebp - 0x478]
push eax
lea ecx, [ebp - 0x45c]
push ecx
mov byte [ebp - 4], 3
call fcn.0040d730
mov esi, 8
add esp, 0xc
cmp dword [ebp - 0x464], esi
jb 0x40d1bf
mov edx, dword [ebp - 0x478]
push edx
call fcn.0042b3ce
add esp, 4
xor eax, eax
mov byte [ebp - 4], 1
mov dword [ebp - 0x464], edi
mov dword [ebp - 0x468], ebx
mov word [ebp - 0x478], ax
cmp dword [ebp - 0x480], esi
jb 0x40d1ef
mov ecx, dword [ebp - 0x494]
push ecx
call fcn.0042b3ce
add esp, 4
mov edx, dword [ebp - 0x44c]
push 2
add edx, 0xfffffffe
push edx
lea ecx, [ebp - 0x45c]
call fcn.00409920
mov eax, dword [ebp - 0x45c]
cmp dword [ebp - 0x448], esi
jae 0x40d21a
lea eax, [ebp - 0x45c]
lea edx, [ebp - 0x21c]
sub edx, eax
movzx ecx, word [eax]
mov word [eax + edx], cx
add eax, 2
cmp cx, bx
jne 0x40d222
mov edi, dword [ebp - 0x498]
mov eax, dword [edi]
mov ecx, dword [eax]
lea edx, [ebp - 0x49c]
push edx
mov edx, dword [ebp - 0x4a0]
push ebx
push edx
push ebx
lea edx, [ebp - 0x21c]
push edx
push eax
mov eax, dword [ecx + 0x10]
call eax
test eax, eax
jns 0x40d27d
cmp dword [edi + 4], ebx
jne 0x40d27d
mov eax, dword [edi]
mov ecx, dword [eax]
lea edx, [ebp - 0x49c]
push edx
push ebx
push ebx
push 0x11
lea edx, [ebp - 0x21c]
push edx
push eax
mov eax, dword [ecx + 0xc]
call eax
cmp dword [ebp - 0x448], esi
jb 0x40d294
mov ecx, dword [ebp - 0x45c]
push ecx
call fcn.0042b3ce
add esp, 4
cmp dword [ebp - 0x42c], 8
mov esi, dword [ebp - 0x49c]
jb 0x40d2b2
mov edx, dword [ebp - 0x440]
push edx
call fcn.0042b3ce
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0042bdb8
mov esp, ebp
pop ebp
ret 4