Function at 0x40ce40
Capabilities:
Delete file
Query environment variable

Disassembly:
push 0xffffffffffffffff
push 0x44b771
mov eax, dword fs:[0]
push eax
sub esp, 0x520
mov eax, dword [0x4606b0]
xor eax, esp
mov dword [esp + 0x51c], eax
push ebp
push esi
mov eax, dword [0x4606b0]
xor eax, esp
push eax
lea eax, [esp + 0x52c]
mov dword fs:[0], eax
call fcn.00415588
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40ce93
push 0x80004005
call fcn.00407b00
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [esp + 0x10], esi
push 0x3ff
lea ecx, [esp + 0x12d]
push 0
mov dword [esp + 0x53c], 0
push ecx
mov byte [esp + 0x134], 0
call fcn.00435e60
add esp, 0xc
lea ecx, [esp + 0x14]
call fcn.0042408c
mov byte [esp + 0x534], 1
call fcn.00415588
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40cef8
push 0x80004005
call fcn.00407b00
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0xc], eax
mov byte [esp + 0x534], 2
cmp dword [edi + 8], 0
jne 0x40cf65
push 0
push 0
push 0x453e14
call fcn.00414cf6
mov byte [esp + 0x534], 1
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cf4c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x534], 0
call fcn.004244c3
lea eax, [esi - 0x10]
jmp 0x40d090
push 0x400
lea ecx, [esp + 0x12c]
push ecx
push str.TEMP
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
jg 0x40cf93
push 0x10
push str.c:ExportCAD.log
lea ecx, [esp + 0x18]
call fcn.00407800
jmp 0x40cfad
lea edx, [esp + 0x128]
push edx
lea eax, [esp + 0x14]
push str._sExportCAD.log
push eax
call fcn.00407bd0
add esp, 0xc
mov ebp, dword [esp + 0x10]
push ebp
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0xd
push 0x453e60
lea ecx, [esp + 0x14]
call fcn.00407800
push 1
lea ecx, [esp + 0x10]
push ecx
push 0
mov ecx, edi
call fcn.00421c7b
push 0
push 0x1001
push ebp
lea ecx, [esp + 0x20]
call fcn.004240a4
cmp eax, 1
jne 0x40d038
mov eax, dword [edi + 8]
xor esi, esi
test eax, eax
jle 0x40d02f
test esi, esi
jl 0x40d0d6
cmp esi, eax
jge 0x40d0d6
mov edx, dword [edi + 4]
lea eax, [edx + esi*4]
mov eax, dword [eax]
push eax
lea ecx, [esp + 0x18]
call fcn.0042429b
push 0x453dd0
lea ecx, [esp + 0x18]
call fcn.0042429b
mov eax, dword [edi + 8]
inc esi
cmp esi, eax
jl 0x40cff7
lea ecx, [esp + 0x14]
call fcn.00424458
push ebp
push str.start___s
lea edx, [esp + 0x30]
call fcn.0040f200
add esp, 8
lea eax, [esp + 0x28]
push eax
call fcn.0040e770
mov byte [esp + 0x534], 1
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d07c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x534], 0
call fcn.004244c3
lea eax, [ebp - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov dword [esp + 0x534], edx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d0b0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x52c]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebp
mov ecx, dword [esp + 0x51c]
xor ecx, esp
call fcn.00434188
add esp, 0x52c
ret
call fcn.004154ac
int3