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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44928c
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.0040cd60
add esp, 4
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x430]
cmp eax, ebx
je 0x40cf95
cmp dword [ebp - 0x42c], 8
mov ecx, dword [ebp - 0x440]
jae 0x40cf7b
lea ecx, [ebp - 0x440]
cmp word [ecx + eax*2 - 2], 0x5c
je 0x40cf95
push 1
push 0x452af4
lea ecx, [ebp - 0x440]
call fcn.0040d2f0
push 0x10
push str.SpreadsheetTools
lea ecx, [ebp - 0x440]
call fcn.0040d2f0
cmp dword [ebp - 0x42c], 8
mov eax, dword [ebp - 0x440]
jae 0x40cfbc
lea eax, [ebp - 0x440]
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call esi
cmp eax, 0xffffffff
jne 0x40cfe7
cmp dword [ebp - 0x42c], 8
mov eax, dword [ebp - 0x440]
jae 0x40cfdf
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.0040d2f0
cmp dword [ebp - 0x42c], 8
mov eax, dword [ebp - 0x440]
jae 0x40d00e
lea eax, [ebp - 0x440]
push eax
call esi
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov esi, ecx
cmp edi, ebx
je 0x40d027
cmp esi, ebx
je 0x40d2a4
push 0x208
lea edx, [ebp - 0x424]
push ebx
push edx
call fcn.0042c280
mov eax, dword [ebp - 0x440]
add esp, 0xc
cmp dword [ebp - 0x42c], 8
jae 0x40d051
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 0x40d060
cmp esi, ebx
je 0x40d0a2
mov esi, dword [ebp - 0x498]
mov eax, 0x10
cmp dword [esi + 4], ebx
jne 0x40d088
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 0x40d0ca
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 0x40d2a4
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.0042c280
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 0x40d121
sub eax, esi
sar eax, 1
push eax
push ecx
lea ecx, [ebp - 0x45c]
call fcn.00408e10
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.00408e10
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.00408e10
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.0040d740
mov esi, 8
add esp, 0xc
cmp dword [ebp - 0x464], esi
jb 0x40d1cf
mov edx, dword [ebp - 0x478]
push edx
call fcn.0042b39e
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 0x40d1ff
mov ecx, dword [ebp - 0x494]
push ecx
call fcn.0042b39e
add esp, 4
mov edx, dword [ebp - 0x44c]
push 2
add edx, 0xfffffffe
push edx
lea ecx, [ebp - 0x45c]
call fcn.00409930
mov eax, dword [ebp - 0x45c]
cmp dword [ebp - 0x448], esi
jae 0x40d22a
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 0x40d232
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 0x40d28d
cmp dword [edi + 4], ebx
jne 0x40d28d
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 0x40d2a4
mov ecx, dword [ebp - 0x45c]
push ecx
call fcn.0042b39e
add esp, 4
cmp dword [ebp - 0x42c], 8
mov esi, dword [ebp - 0x49c]
jb 0x40d2c2
mov edx, dword [ebp - 0x440]
push edx
call fcn.0042b39e
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.0042bd88
mov esp, ebp
pop ebp
ret 4