Function at 0x413c20
Capabilities:
Check if file exists
Create directory
Get file attributes
Query environment variable

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54622c
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x194
mov eax, dword [0x57f0b4]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x104
lea eax, [ebp - 0x120]
mov dword [ebp - 0x15c], 0
push 0
push eax
call fcn.0051b820
add esp, 0xc
mov dword [ebp - 0x128], 0
mov dword [ebp - 0x124], 0xf
mov byte [ebp - 0x138], 0
push 0x104
lea eax, [ebp - 0x120]
mov dword [ebp - 4], 0
push eax
push str._appdata_Sensor
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
lea ecx, [ebp - 0x120]
mov dword [ebp - 0x140], 0
mov dword [ebp - 0x13c], 0xf
lea edx, [ecx + 1]
mov byte [ebp - 0x150], 0
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x413ce0
sub ecx, edx
lea eax, [ebp - 0x120]
push ecx
push eax
lea ecx, [ebp - 0x150]
call fcn.00405f10
cmp dword [ebp - 0x13c], 0x10
lea eax, [ebp - 0x150]
cmovae eax, dword [ebp - 0x150]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x413d25
mov byte [ebp - 0x154], 1
jmp 0x413d32
shr al, 4
not al
and al, 1
mov dword [ebp - 0x154], eax
mov edx, dword [ebp - 0x13c]
cmp edx, 0x10
jb 0x413d6c
mov ecx, dword [ebp - 0x150]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x413d62
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41406e
push edx
push ecx
call fcn.005186d6
add esp, 8
cmp byte [ebp - 0x154], 0
je 0x413d84
push 0
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 9
push str.access.db
lea ecx, [ebp - 0x150]
mov dword [ebp - 0x140], 0
mov dword [ebp - 0x13c], 0xf
mov byte [ebp - 0x150], 0
call fcn.00405f10
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x18c]
push 1
push 0x56af54
mov dword [ebp - 0x17c], 0
mov dword [ebp - 0x178], 0xf
mov byte [ebp - 0x18c], 0
call fcn.00405f10
lea ecx, [ebp - 0x120]
mov byte [ebp - 4], 2
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x413df0
sub ecx, edx
lea eax, [ebp - 0x120]
push ecx
push eax
push ecx
lea ecx, [ebp - 0x18c]
call fcn.00415d70
mov dword [ebp - 0x164], 0
mov dword [ebp - 0x160], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x174], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x164], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
mov byte [ebp - 4], 3
mov esi, dword [ebp - 0x160]
mov eax, esi
mov ecx, dword [ebp - 0x164]
sub eax, ecx
mov edx, dword [ebp - 0x140]
cmp edx, eax
jbe 0x413e93
mov eax, dword [ebp - 0x13c]
sub eax, edx
cmp eax, ecx
jb 0x413e93
cmp esi, 0x10
lea eax, [ebp - 0x174]
push ecx
cmovae eax, dword [ebp - 0x174]
push eax
push ecx
lea ecx, [ebp - 0x150]
call fcn.00415d70
jmp 0x413ea5
lea eax, [ebp - 0x150]
push eax
lea ecx, [ebp - 0x174]
call fcn.004046f0
movups xmm0, xmmword [eax]
lea ecx, [ebp - 0x138]
movups xmmword [ebp - 0x1a0], xmm0
movq xmm0, qword [eax + 0x10]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
movq qword [ebp - 0x158], xmm0
call fcn.00404760
movups xmm0, xmmword [ebp - 0x1a0]
movups xmmword [ebp - 0x138], xmm0
movq xmm0, qword [ebp - 0x158]
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x160]
movq qword [ebp - 0x128], xmm0
cmp edx, 0x10
jb 0x413f34
mov ecx, dword [ebp - 0x174]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x413f2a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x414073
push edx
push ecx
call fcn.005186d6
add esp, 8
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x178]
mov dword [ebp - 0x164], 0
mov dword [ebp - 0x160], 0xf
mov byte [ebp - 0x174], 0
cmp edx, 0x10
jb 0x413f8d
mov ecx, dword [ebp - 0x18c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x413f83
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x414078
push edx
push ecx
call fcn.005186d6
add esp, 8
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x13c]
mov dword [ebp - 0x17c], 0
mov dword [ebp - 0x178], 0xf
mov byte [ebp - 0x18c], 0
cmp edx, 0x10
jb 0x413fe6
mov ecx, dword [ebp - 0x150]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x413fdc
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41407d
push edx
push ecx
call fcn.005186d6
add esp, 8
cmp dword [ebp - 0x124], 0x10
lea ecx, [ebp - 0x138]
push 0
cmovae ecx, dword [ebp - 0x138]
lea edx, [ebp - 0x15c]
push 6
call fcn.004af0c0
mov esi, dword [ebp - 0x15c]
xor ecx, ecx
mov edx, dword [ebp - 0x124]
add esp, 8
test eax, eax
cmovne esi, ecx
cmp edx, 0x10
jb 0x41404f
mov ecx, dword [ebp - 0x138]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x414045
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x414082
push edx
push ecx
call fcn.005186d6
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00518690
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.00527f3b
call fcn.00527f3b
call fcn.00527f3b
call fcn.00527f3b
call fcn.00527f3b
int3