Function at 0x40cf60
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 [0x45d320]
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.0040cdc0
add esp, 4
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x430]
cmp eax, ebx
je 0x40cff5
cmp dword [ebp - 0x42c], 8
mov ecx, dword [ebp - 0x440]
jae 0x40cfdb
lea ecx, [ebp - 0x440]
cmp word [ecx + eax*2 - 2], 0x5c
je 0x40cff5
push 1
push 0x453978
lea ecx, [ebp - 0x440]
call fcn.0040d350
push 0x10
push str.SpreadsheetTools
lea ecx, [ebp - 0x440]
call fcn.0040d350
cmp dword [ebp - 0x42c], 8
mov eax, dword [ebp - 0x440]
jae 0x40d01c
lea eax, [ebp - 0x440]
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call esi
cmp eax, 0xffffffff
jne 0x40d047
cmp dword [ebp - 0x42c], 8
mov eax, dword [ebp - 0x440]
jae 0x40d03f
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.0040d350
cmp dword [ebp - 0x42c], 8
mov eax, dword [ebp - 0x440]
jae 0x40d06e
lea eax, [ebp - 0x440]
push eax
call esi
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov esi, ecx
cmp edi, ebx
je 0x40d087
cmp esi, ebx
je 0x40d304
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 0x40d0b1
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 0x40d0c0
cmp esi, ebx
je 0x40d102
mov esi, dword [ebp - 0x498]
mov eax, 0x10
cmp dword [esi + 4], ebx
jne 0x40d0e8
mov eax, 0x12
push esi
push 0x452c48
push ebx
push ebx
push ebx
push ebx
push eax
lea eax, [ebp - 0x424]
push eax
call dword [sym.imp.ole32.dll_StgOpenStorageEx]
jmp 0x40d12a
mov ecx, dword [ebp - 0x498]
push ecx
push 0x452c48
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 0x40d304
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 0x40d181
sub eax, esi
sar eax, 1
push eax
push ecx
lea ecx, [ebp - 0x45c]
call fcn.00408e30
mov byte [ebp - 4], 1
push ebx
xor eax, eax
push 0x453990
lea ecx, [ebp - 0x494]
mov dword [ebp - 0x480], edi
mov dword [ebp - 0x484], ebx
mov word [ebp - 0x494], ax
call fcn.00408e30
mov byte [ebp - 4], 2
xor ecx, ecx
push 1
mov word [ebp - 0x478], cx
push 0x453d1c
lea ecx, [ebp - 0x478]
mov dword [ebp - 0x464], edi
mov dword [ebp - 0x468], ebx
call fcn.00408e30
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.0040d7a0
mov esi, 8
add esp, 0xc
cmp dword [ebp - 0x464], esi
jb 0x40d22f
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 0x40d25f
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.00409960
mov eax, dword [ebp - 0x45c]
cmp dword [ebp - 0x448], esi
jae 0x40d28a
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 0x40d292
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 0x40d2ed
cmp dword [edi + 4], ebx
jne 0x40d2ed
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 0x40d304
mov ecx, dword [ebp - 0x45c]
push ecx
call fcn.0042b39e
add esp, 4
cmp dword [ebp - 0x42c], 8
mov esi, dword [ebp - 0x49c]
jb 0x40d322
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