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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44943c
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.0040cdd0
add esp, 4
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x430]
cmp eax, ebx
je 0x40d005
cmp dword [ebp - 0x42c], 8
mov ecx, dword [ebp - 0x440]
jae 0x40cfeb
lea ecx, [ebp - 0x440]
cmp word [ecx + eax*2 - 2], 0x5c
je 0x40d005
push 1
push 0x453b18
lea ecx, [ebp - 0x440]
call fcn.0040d360
push 0x10
push str.SpreadsheetTools
lea ecx, [ebp - 0x440]
call fcn.0040d360
cmp dword [ebp - 0x42c], 8
mov eax, dword [ebp - 0x440]
jae 0x40d02c
lea eax, [ebp - 0x440]
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push eax
call esi
cmp eax, 0xffffffff
jne 0x40d057
cmp dword [ebp - 0x42c], 8
mov eax, dword [ebp - 0x440]
jae 0x40d04f
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.0040d360
cmp dword [ebp - 0x42c], 8
mov eax, dword [ebp - 0x440]
jae 0x40d07e
lea eax, [ebp - 0x440]
push eax
call esi
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov esi, ecx
cmp edi, ebx
je 0x40d097
cmp esi, ebx
je 0x40d314
push 0x208
lea edx, [ebp - 0x424]
push ebx
push edx
call fcn.0042c3a0
mov eax, dword [ebp - 0x440]
add esp, 0xc
cmp dword [ebp - 0x42c], 8
jae 0x40d0c1
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 0x40d0d0
cmp esi, ebx
je 0x40d112
mov esi, dword [ebp - 0x498]
mov eax, 0x10
cmp dword [esi + 4], ebx
jne 0x40d0f8
mov eax, 0x12
push esi
push 0x452de8
push ebx
push ebx
push ebx
push ebx
push eax
lea eax, [ebp - 0x424]
push eax
call dword [sym.imp.ole32.dll_StgOpenStorageEx]
jmp 0x40d13a
mov ecx, dword [ebp - 0x498]
push ecx
push 0x452de8
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 0x40d314
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.0042c3a0
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 0x40d191
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 0x453b30
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 0x453ebc
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.0040d7b0
mov esi, 8
add esp, 0xc
cmp dword [ebp - 0x464], esi
jb 0x40d23f
mov edx, dword [ebp - 0x478]
push edx
call fcn.0042b4be
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 0x40d26f
mov ecx, dword [ebp - 0x494]
push ecx
call fcn.0042b4be
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 0x40d29a
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 0x40d2a2
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 0x40d2fd
cmp dword [edi + 4], ebx
jne 0x40d2fd
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 0x40d314
mov ecx, dword [ebp - 0x45c]
push ecx
call fcn.0042b4be
add esp, 4
cmp dword [ebp - 0x42c], 8
mov esi, dword [ebp - 0x49c]
jb 0x40d332
mov edx, dword [ebp - 0x440]
push edx
call fcn.0042b4be
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.0042bea8
mov esp, ebp
pop ebp
ret 4