Function at 0x40409b
Capabilities:
Get file attributes
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov ecx, dword [ebp + 0x14]
push ebx
xor ebx, ebx
or eax, 0xffffffff
push esi
cmp ecx, ebx
push edi
je 0x4040b7
mov dword [ecx], ebx
jmp 0x4040b9
xor eax, eax
mov esi, dword [ebp + 8]
mov ecx, esi
mov dl, byte [esi]
neg ecx
sbb ecx, ecx
neg dl
sbb edx, edx
and ecx, edx
test eax, ecx
jne 0x4040da
push 0x57
call fcn.004021e2
jmp 0x40448a
push 0x412ab0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x412c1c], ebx
jne 0x40410c
push ebx
push 0x821
push str.SFILE.CPP
push 0x1400
call fcn.00402201
mov dword [0x412c1c], eax
call fcn.0040448e
mov edi, 0x104
lea eax, [ebp - 0x10c]
push edi
push esi
push eax
call fcn.00405013
lea eax, [ebp - 0x10c]
mov byte [ebp - 9], bl
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 0x10
je 0x404177
cmp byte [esi], 0x5c
je 0x404169
push 0x40c220
push esi
call fcn.00407f50
pop ecx
test eax, eax
pop ecx
jne 0x404169
push 0x40c21c
push esi
call fcn.00407f50
pop ecx
test eax, eax
pop ecx
jne 0x404169
lea edx, [ebp - 0x10c]
mov ecx, esi
call fcn.004045c7
jmp 0x404177
push edi
lea eax, [ebp - 0x10c]
push esi
push eax
call fcn.00405013
lea ecx, [ebp - 0x10c]
call fcn.00404507
cmp dword [ebp + 0x10], ebx
mov dword [ebp - 8], eax
je 0x404192
cmp eax, ebx
je 0x404478
push ebx
push ebx
push 3
push ebx
push 1
lea eax, [ebp - 0x10c]
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
je 0x40447f
push ebx
push ebx
push ebx
mov ecx, 0x412ae8
call fcn.00404e56
mov esi, eax
lea ecx, [ebp - 0x10c]
push edi
push ecx
lea eax, [esi + 8]
push eax
call fcn.00405013
mov eax, dword [ebp - 8]
mov edi, dword [ebp + 8]
neg eax
sbb eax, eax
push ebx
and eax, 2
push 0x853
mov dword [esi + 0x110], eax
mov eax, dword [ebp + 0xc]
push str.SFILE.CPP
push 0x20
mov dword [esi + 0x10c], edi
mov dword [esi + 0x114], eax
call fcn.00402201
push ebx
push ebx
push ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esi + 0x134], eax
mov dword [esi + 0x12c], ebx
call edi
lea eax, [ebp - 4]
push ebx
push eax
push 0x20
mov dword [ebp - 4], ebx
push dword [esi + 0x134]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 4], 0x20
mov eax, dword [esi + 0x134]
jne 0x40426c
mov ecx, 0x1a51504d
cmp dword [eax], ecx
je 0x40429f
add dword [esi + 0x12c], 0x200
cmp dword [eax], ecx
je 0x40429f
push ebx
push ebx
push dword [esi + 0x12c]
push dword [ebp + 8]
jmp 0x404221
cmp eax, ebx
je 0x404281
push ebx
push 0x3cd
push str.u:projects_stormh_storm.h
push eax
call fcn.00402a3d
push esi
mov ecx, 0x412ae8
call fcn.00404ea2
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x8510006c
jmp 0x40447a
mov ecx, dword [esi + 0x134]
mov eax, 0x200
push ebx
push 0x86c
mov cl, byte [ecx + 0xe]
push str.SFILE.CPP
shl eax, cl
push eax
mov dword [esi + 0x120], eax
call fcn.00402201
mov dword [esi + 0x124], eax
mov eax, dword [esi + 0x134]
push ebx
push 0x86f
mov eax, dword [eax + 0x18]
push str.SFILE.CPP
shl eax, 4
push eax
call fcn.00402201
mov dword [esi + 0x138], eax
mov eax, dword [esi + 0x134]
push ebx
push ebx
mov eax, dword [eax + 0x10]
add eax, dword [esi + 0x12c]
push eax
push dword [ebp + 8]
call edi
lea eax, [esi + 8]
mov edx, dword [esi + 0x138]
push eax
lea eax, [ebp - 4]
push eax
mov eax, dword [esi + 0x134]
mov ecx, dword [ebp + 8]
mov eax, dword [eax + 0x18]
shl eax, 4
push eax
call fcn.00403b6d
push 3
mov ecx, str._hash_table_
pop edx
call fcn.00402d44
mov ecx, dword [esi + 0x138]
push eax
mov eax, dword [esi + 0x134]
mov edx, dword [eax + 0x18]
shl edx, 4
call fcn.00403aa7
mov eax, dword [esi + 0x134]
push ebx
push 0x87b
push str.SFILE.CPP
mov eax, dword [eax + 0x1c]
shl eax, 4
push eax
call fcn.00402201
mov dword [esi + 0x130], eax
mov eax, dword [esi + 0x134]
push ebx
push ebx
mov eax, dword [eax + 0x14]
add eax, dword [esi + 0x12c]
push eax
push dword [ebp + 8]
call edi
lea eax, [esi + 8]
mov edx, dword [esi + 0x130]
push eax
lea eax, [ebp - 4]
push eax
mov eax, dword [esi + 0x134]
mov ecx, dword [ebp + 8]
mov eax, dword [eax + 0x1c]
shl eax, 4
push eax
call fcn.00403b6d
push 3
mov ecx, str._block_table_
pop edx
call fcn.00402d44
mov ecx, dword [esi + 0x130]
push eax
mov eax, dword [esi + 0x134]
mov edx, dword [eax + 0x1c]
shl edx, 4
call fcn.00403aa7
cmp dword [esi + 0x12c], ebx
je 0x40440e
mov eax, dword [esi + 0x134]
xor edi, edi
cmp dword [eax + 0x1c], ebx
jbe 0x40440e
xor edx, edx
mov eax, dword [esi + 0x130]
lea ecx, [edx + eax]
mov eax, dword [edx + eax]
cmp eax, ebx
je 0x4043ff
add eax, dword [esi + 0x12c]
mov dword [ecx], eax
mov eax, dword [esi + 0x134]
inc edi
add edx, 0x10
cmp edi, dword [eax + 0x1c]
jb 0x4043e7
mov eax, dword [0x412af0]
cmp eax, ebx
jg 0x40441d
xor eax, eax
cmp eax, ebx
je 0x40442d
mov ecx, dword [ebp + 0xc]
cmp dword [eax + 0x114], ecx
jle 0x40442d
mov eax, dword [eax + 4]
jmp 0x404413
push eax
push 2
push esi
mov ecx, 0x412ae8
call fcn.00406357
cmp dword [ebp - 8], ebx
je 0x404468
cmp dword [0x40d398], 0xffffffff
jne 0x404468
call fcn.00402f9f
mov eax, dword [ebp + 0x14]
push 0x412ab0
mov dword [eax], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret 0x10
cmp dword [ebp + 0x10], ebx
je 0x40444e
cmp dword [ebp - 8], ebx
jne 0x40444e
push esi
call fcn.00402d9b
push 0xf
call fcn.004021e2
push 0x412ab0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x404461