Function at 0x10037ad0
Capabilities:
Check if file exists
Get file attributes
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10040181
mov eax, dword fs:[0]
push eax
mov eax, 0x106c
call fcn.10032480
mov eax, dword [0x10058684]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x1040], eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, eax
cmp esi, 0xffffffff
je 0x10037cc9
push 0
and eax, 0x10
shl eax, 0x15
push eax
push 3
push 0
push 1
push connect
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x10037cc9
mov ecx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ecx
lea edx, [ebp - 0x105c]
push edx
call fcn.10037a70
add esp, 0xc
lea eax, [ebp - 0x1078]
push eax
push 0
push 0
push edi
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetFileTime]
lea ecx, [ebp - 0x1070]
push ecx
lea edx, [ebp - 0x1078]
push edx
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
lea eax, [ebp - 0x1050]
push eax
lea ecx, [ebp - 0x104c]
push ecx
lea edx, [ebp - 0x1070]
push edx
call dword [sym.imp.KERNEL32.dll_FileTimeToDosDateTime]
movzx ecx, word [ebp - 0x104c]
movzx edx, word [ebp - 0x1050]
xor eax, eax
shl ecx, 0x10
or ecx, edx
mov dword [ebp - 0x101c], eax
mov dword [ebp - 0x1034], eax
mov dword [ebp - 0x1030], eax
mov dword [ebp - 0x102c], eax
mov dword [ebp - 0x1028], eax
mov dword [ebp - 0x1024], eax
mov dword [ebp - 0x1020], eax
mov dword [ebp - 0x1018], eax
mov dword [ebp - 0x101c], ecx
or eax, esi
push ebx
lea ecx, [ebp - 0x103c]
mov dword [ebp - 0x1014], eax
call fcn.100021a3
cmp byte [ebp + 0x14], 0
je 0x10037cf5
push 0xfde9
lea eax, [ebp - 0x103c]
push eax
lea ecx, [ebp - 0x1038]
push ecx
mov byte [ebp - 4], 1
call fcn.1003b8e0
mov eax, dword [ebp - 0x103c]
add eax, 0xfffffff0
add esp, 0xc
mov byte [ebp - 4], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x10037c56
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x800
push 0
push 0
push 0
push 0
mov edx, dword [ebp - 0x1038]
push 8
mov ebx, dword [ebp - 0x1040]
push 0xfffffffffffffff1
push 0
push 9
push 8
push 0
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x1034]
push ecx
push edx
push ebx
call fcn.1003b830
add esp, 0x48
test eax, eax
mov eax, dword [ebp - 0x1038]
je 0x10037cd0
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10037cba
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x105c]
push ecx
call fcn.100378d0
add esp, 4
xor eax, eax
jmp 0x10037eaa
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x10037d92
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x10037d92
push 0
lea ecx, [ebp - 0x103c]
push ecx
lea edx, [ebp - 0x1038]
push edx
mov byte [ebp - 4], 2
call fcn.1003b8e0
mov eax, dword [ebp - 0x103c]
add eax, 0xfffffff0
add esp, 0xc
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10037d37
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [ebp - 0x1038]
mov eax, dword [ebp - 0x1040]
push 9
push 8
push 0
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x1034]
push ecx
push edx
push eax
call fcn.1003b890
add esp, 0x28
test eax, eax
mov eax, dword [ebp - 0x1038]
jne 0x10037c9e
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x10037d8c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [ebp - 0x1040]
push ebx
lea ecx, [ebp - 0x1068]
push 0x1003b0a0
push ecx
call fcn.10037a70
add esp, 0xc
lea edx, [ebp - 0x1048]
xor eax, eax
push edx
push edi
mov dword [ebp - 0x1048], eax
mov dword [ebp - 0x1044], eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x10037de9
lea eax, [ebp - 0x1068]
push eax
call fcn.10037930
lea ecx, [ebp - 0x105c]
push ecx
call fcn.100378d0
add esp, 8
xor eax, eax
jmp 0x10037eaa
mov ecx, dword [ebp - 0x1044]
test ecx, ecx
jl 0x10037e8a
mov eax, dword [ebp - 0x1048]
jg 0x10037e07
test eax, eax
je 0x10037e8a
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [ecx]
test ecx, ecx
jl 0x10037e22
jg 0x10037e1d
cmp eax, 0x1000
jbe 0x10037e22
mov eax, 0x1000
push 0
lea edx, [ebp - 0x1038]
push edx
push eax
lea eax, [ebp - 0x1010]
push eax
push edi
mov dword [ebp - 0x1038], 0
call esi
test eax, eax
je 0x10037dc7
mov ecx, dword [ebp - 0x1038]
push ecx
lea edx, [ebp - 0x1010]
push edx
push ebx
call fcn.10039fe0
add esp, 0xc
test eax, eax
js 0x10037ec6
mov eax, dword [ebp - 0x1048]
sub eax, dword [ebp - 0x1038]
mov ecx, dword [ebp - 0x1044]
sbb ecx, 0
mov dword [ebp - 0x1048], eax
mov dword [ebp - 0x1044], ecx
test ecx, ecx
jg 0x10037e1d
jl 0x10037e8a
test eax, eax
jne 0x10037e10
lea ecx, [ebp - 0x1068]
push ecx
call fcn.10037930
lea edx, [ebp - 0x105c]
push edx
call fcn.100378d0
add esp, 8
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1001d73b
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x1068]
push edx
call fcn.10037930
lea eax, [ebp - 0x105c]
push eax
call fcn.100378d0
add esp, 8
xor eax, eax
jmp 0x10037eaa