Function at 0x4c6440
Capabilities:
Check if file exists
Create directory
Delete file
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x63c
mov eax, dword [0x57f0b4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x208
lea eax, [ebp - 0x420]
mov dword [ebp - 0x63c], ecx
push 0
push eax
call fcn.0051b820
add esp, 0xc
lea eax, [ebp - 0x420]
push 0x5c6588
push 0x104
push eax
call fcn.00529dc8
add esp, 0xc
lea eax, [ebp - 0x420]
push 0x574f58
push 0x104
push eax
call fcn.00529dc8
add esp, 0xc
lea eax, [ebp - 0x420]
push eax
call fcn.0052abc6
add esp, 4
lea eax, [ebp - 0x420]
push str.sensor
push 0x104
push eax
call fcn.00529dc8
add esp, 0xc
lea eax, [ebp - 0x218]
or ebx, 0xffffffff
push 0x20a
push 0
push eax
call fcn.0051b820
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
add esp, 0xc
xor esi, esi
nop dword [eax]
push esi
lea eax, [ebp - 0x420]
mov dword [ebp - 0x638], 0
push eax
push str._s._d
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.004b5740
add esp, 0x14
lea eax, [ebp - 0x218]
push eax
call edi
test eax, eax
je 0x4c665b
push 0
push 2
push 3
push 0
push 0
push bind
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4c6559
or ebx, eax
mov eax, dword [ebp - 0x638]
jmp 0x4c658b
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push edi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, 0xffffffff
jne 0x4c657a
mov eax, dword [ebp - 0x638]
or ebx, ebx
jmp 0x4c658b
cmp ebx, 0x500000
jb 0x4c6658
mov eax, 1
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
inc esi
cmp esi, 5
jl 0x4c64f0
test eax, eax
je 0x4c65fb
cmp esi, 5
jne 0x4c65fb
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor esi, esi
nop dword [eax]
push 0x20a
lea eax, [ebp - 0x630]
push 0
push eax
call fcn.0051b820
add esp, 0xc
lea eax, [ebp - 0x420]
push esi
push eax
push str._s._d
lea eax, [ebp - 0x630]
push 0x104
push eax
call fcn.004b5740
add esp, 0x14
lea eax, [ebp - 0x630]
push eax
call edi
inc esi
cmp esi, 5
jl 0x4c65b0
mov esi, 1
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [esi - 1]
push eax
lea eax, [ebp - 0x420]
push eax
push str._s._d
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.004b5740
add esp, 0x14
lea eax, [ebp - 0x218]
push eax
call edi
push 0
test eax, eax
lea eax, [ebp - 0x218]
push 2
jne 0x4c665e
push 1
push 0
push 0
push 0x10000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x638], edi
jmp 0x4c6678
inc esi
jmp 0x4c65fb
inc esi
jmp 0x4c6601
push 3
push 0
push 0
push 0x10000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x638], eax
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, dword [ebp - 0x63c]
mov edx, eax
mov eax, edi
lea ecx, [eax + 2]
mov dword [ebp - 0x63c], ecx
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4c66a5
sub eax, dword [ebp - 0x63c]
push 0
sar eax, 1
add eax, eax
push eax
push 0
push edx
push dword [ebp - 0x638]
call dword [sym.imp.KERNEL32.dll_LockFile]
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4c66d1
sub ecx, edx
lea eax, [ebp - 0x634]
push 0
sar ecx, 1
push eax
lea eax, [ecx + ecx]
push eax
push edi
push dword [ebp - 0x638]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x638]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [edi + 2]
nop dword [eax]
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x4c6710
sub edi, ecx
sar edi, 1
lea ecx, [ebx + edi*2]
cmp ecx, 0x500000
jb 0x4c6791
mov eax, esi
mov ecx, 5
cdq
idiv ecx
lea eax, [ebp - 0x218]
push edx
push str.sensor
push str._s._d
push 0x104
push eax
call fcn.004b5740
add esp, 0x14
lea eax, [ebp - 0x218]
push 0
push 2
push 2
push 0
push 0
push 0x10000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4c6791
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00518690
mov esp, ebp
pop ebp
ret