Function at 0x4018b0
Capabilities:
Check if file exists
Create directory
Get file attributes
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x854
mov eax, dword [0x473004]
xor eax, esp
mov dword [esp + 0x850], eax
push ebx
push esi
push edi
mov ebx, ecx
mov dword [esp + 0xc], 0x54534449
push ebx
push str.MDL:__s_n
mov dword [esp + 0x18], 0x51534449
call fcn.00401070
add esp, 8
test ebx, ebx
je 0x401922
mov edi, ebx
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x4018f6
sub edi, ecx
mov dword [esp + 0x18], edi
cmp edi, 0x3fd
jbe 0x401928
push 2
call fcn.00417cab
push eax
push str.ERROR:_Source_path_is_too_long._n
call fcn.004339d5
jmp 0x402103
xor edi, edi
mov dword [esp + 0x18], edi
mov ecx, ebx
call fcn.00407480
test eax, eax
jne 0x401962
push str.ERROR:_Source_file_does_not_have_extension._n
push 2
call fcn.00417cab
add esp, 4
push eax
call fcn.00401040
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x850]
xor ecx, esp
call fcn.0040c692
mov esp, ebp
pop ebp
ret
push 0x46caec
push eax
call fcn.0043ce43
add esp, 8
test eax, eax
je 0x40197b
push str.ERROR:_Only_.mdl_files_is_supported._n
jmp 0x401938
lea edx, [esp + 0x14]
mov ecx, ebx
call fcn.004064d0
mov ecx, eax
mov dword [0x475940], ecx
test ecx, ecx
jne 0x40199d
push ebx
push str.ERROR:_Cant_open__s_n
jmp 0x4020f3
mov eax, dword [esp + 0x14]
cmp eax, 0xf4
jb 0x4020ed
cmp eax, dword [ecx + 0x48]
jne 0x4020ed
mov eax, dword [ecx]
lea edx, [esp + 0xc]
cmp eax, dword [edx]
je 0x4019fb
lea edx, [esp + 0x10]
mov ecx, str.ERROR:__s_is_not_a_valid_HL_model_file._n
cmp eax, dword [edx]
mov esi, str.ERROR:__s_is_not_a_main_HL_model_file._n
push 2
cmovne esi, ecx
call fcn.00417cab
push ebx
push esi
push eax
call fcn.00401040
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x850]
xor ecx, esp
call fcn.0040c692
mov esp, ebp
pop ebp
ret
mov eax, dword [ecx + 4]
cmp eax, 0xa
je 0x401a34
push eax
push ebx
push str.ERROR:__s_has_unknown_Studio_MDL_format_version__d._n
push 2
call fcn.00417cab
add esp, 4
push eax
call fcn.00401040
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x850]
xor ecx, esp
call fcn.0040c692
mov esp, ebp
pop ebp
ret
cmp dword [ecx + 0xcc], 0
jne 0x401a48
push ebx
push str.ERROR:__s_is_not_a_main_HL_model_file._n
jmp 0x4020f3
cmp byte [0x475140], 0
je 0x401ace
mov esi, 0x475140
nop word [eax + eax]
push 0x46d978
push esi
call fcn.00435520
mov esi, eax
add esp, 8
test esi, esi
je 0x401a7d
mov al, byte [esi]
mov byte [esp + 0x1f], al
mov byte [esi], 0
push 0x475140
call fcn.0043594b
add esp, 4
cmp eax, 0xffffffff
jne 0x401aad
call fcn.00435613
cmp dword [eax], 0x11
jne 0x401abf
push 0x475140
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x401abf
test al, 0x10
je 0x401abf
test esi, esi
je 0x401b30
mov al, byte [esp + 0x1f]
mov byte [esi], al
inc esi
cmp byte [esi], 0
jne 0x401a60
jmp 0x401b30
push 0x475140
push str.ERROR:_Couldnt_create_directory__s_n
jmp 0x4020f3
test ebx, ebx
je 0x401aeb
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401ad7
sub ecx, edx
lea esi, [ebx - 1]
add esi, ecx
cmp esi, ebx
jbe 0x401b0f
jmp 0x401af0
lea esi, [ebx - 1]
nop
mov cl, byte [esi - 1]
cmp cl, 0x5c
je 0x401b18
cmp cl, 0x2f
je 0x401b0b
dec esi
cmp esi, ebx
ja 0x401af0
mov byte [0x475140], 0
jmp 0x401b61
cmp esi, ebx
ja 0x401b18
mov byte [0x475140], 0
jmp 0x401b61
sub esi, ebx
push esi
push ebx
push 0x475140
call fcn.00415ed0
add esp, 0xc
mov byte [esi + 0x47513f], 0
cmp byte [0x475140], 0
je 0x401b61
mov ecx, 0x475140
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401b41
sub ecx, edx
mov al, byte [ecx + 0x47513f]
cmp al, 0x5c
je 0x401b61
cmp al, 0x2f
je 0x401b61
mov word [ecx + 0x475140], 0x2f
mov eax, dword [0x475940]
cmp dword [eax + 0xb4], 0
jne 0x401c6b
test ebx, ebx
je 0x401bbe
mov ecx, ebx
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401b80
sub ecx, edx
inc ecx
cmp ecx, 0x400
jbe 0x401baf
mov ecx, 0xff
lea edi, [esp + 0x58]
mov esi, ebx
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x18]
mov byte [esp + 0x457], al
jmp 0x401bbe
push ecx
lea eax, [esp + 0x5c]
push ebx
push eax
call fcn.00415ed0
add esp, 0xc
mov esi, 0x404
sub esi, edi
lea edi, [esp + edi + 0x54]
test edi, edi
je 0x401c00
test esi, esi
je 0x401c00
cmp esi, 6
jae 0x401bef
lea eax, [esi - 1]
push eax
push str.t.mdl
push edi
call fcn.00415ed0
add esp, 0xc
mov byte [edi + esi - 1], 0
jmp 0x401c00
mov eax, dword [str.t.mdl]
mov dword [edi], eax
mov ax, word [0x46cbf4]
mov word [edi + 4], ax
lea edx, [esp + 0x14]
lea ecx, [esp + 0x58]
call fcn.004064d0
mov ecx, eax
mov dword [0x475124], ecx
test ecx, ecx
jne 0x401c28
lea eax, [esp + 0x58]
push eax
push str.ERROR:_Cant_open_external_textures_file__s_n
jmp 0x4020f3
mov eax, dword [esp + 0x14]
cmp eax, 0xf4
jb 0x401c61
cmp eax, dword [ecx + 0x48]
jne 0x401c61
mov eax, dword [ecx]
lea edx, [esp + 0xc]
cmp eax, dword [edx]
jne 0x401c52
cmp dword [ecx + 0xb4], 0
je 0x401c52
mov eax, dword [0x475940]
jmp 0x401c70
lea eax, [esp + 0x58]
push eax
push str.ERROR:__s_is_not_a_valid_external_textures_file._n
jmp 0x4020f3
lea eax, [esp + 0x58]
push eax
jmp 0x4020ee
mov dword [0x475124], eax
mov eax, dword [eax + 0xac]
shl eax, 2
push eax
call fcn.00433a09
add esp, 4
mov dword [0x475128], eax
test eax, eax
jne 0x401ca2
push 2
call fcn.00417cab
push eax
push str.ERROR:_Couldnt_allocate_memory_for_sequences._n
call fcn.004339d5
jmp 0x402103
mov edi, dword [0x475940]
mov dword [eax], edi
cmp dword [edi + 0xac], 1
jle 0x401e38
test ebx, ebx
je 0x401d06
mov edx, ebx
lea esi, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x401cc0
sub edx, esi
inc edx
cmp edx, 0x400
jbe 0x401cf4
mov ecx, 0xff
lea edi, [esp + 0x458]
mov esi, ebx
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov edi, dword [0x475940]
mov byte [esp + 0x857], al
jmp 0x401d06
push edx
lea eax, [esp + 0x45c]
push ebx
push eax
call fcn.00415ed0
add esp, 0xc
mov esi, 1
cmp dword [edi + 0xac], esi
jle 0x401e38
mov eax, dword [esp + 0x18]
mov ecx, 0x404
sub ecx, eax
mov dword [esp + 0xc], ecx
lea eax, [esp + eax + 0x454]
mov dword [esp + 0x20], eax
push esi
push str._02d.mdl
push ecx
push eax
call fcn.004071e0
lea eax, [esp + 0x468]
push 0x46d9a4
push eax
call fcn.00434537
add esp, 0x18
mov dword [esp + 0x18], eax
lea ecx, [esi*4]
mov dword [esp + 0x24], ecx
test eax, eax
je 0x401e1a
push eax
call fcn.0043cf77
lea ecx, [esp + 0x2c]
push ecx
push eax
call fcn.00437a5a
mov eax, dword [esp + 0x48]
push eax
mov dword [esp + 0x24], eax
call fcn.00433a09
mov edi, eax
add esp, 0x10
test edi, edi
je 0x401e16
push dword [esp + 0x18]
push 1
push dword [esp + 0x1c]
push edi
call fcn.00435bc1
push dword [esp + 0x28]
call fcn.004346f6
mov eax, dword [0x475128]
lea ecx, [esi*4]
add esp, 0x14
mov dword [ecx + eax], edi
mov eax, dword [esp + 0x14]
cmp eax, 0xf4
jb 0x401e09
cmp eax, dword [edi + 0x48]
jne 0x401e09
mov eax, dword [edi]
lea ecx, [esp + 0x10]
cmp eax, dword [ecx]
jne 0x401df7
mov edi, dword [0x475940]
inc esi
cmp esi, dword [edi + 0xac]
jge 0x401e38
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x20]
jmp 0x401d31
lea eax, [esp + 0x458]
push eax
push str.ERROR:__s_is_not_a_valid_sequence_file._n
jmp 0x4020f3
lea eax, [esp + 0x458]
push eax
jmp 0x4020ee
mov ecx, dword [esp + 0x24]
mov eax, dword [0x475128]
mov dword [ecx + eax], 0
lea eax, [esp + 0x458]
push eax
push str.ERROR:_Cant_open_sequence_file__s_n
jmp 0x4020f3
test ebx, ebx
je 0x401e93
mov cl, byte [ebx]
test cl, cl
je 0x401e93
xor esi, esi
mov edx, ebx
cmp cl, 0x2f
je 0x401e50
cmp cl, 0x5c
jne 0x401e53
lea ebx, [edx + 1]
cmp cl, 0x2e
mov eax, edx
mov cl, byte [edx + 1]
cmovne eax, esi
inc edx
mov esi, eax
test cl, cl
jne 0x401e46
test esi, esi
je 0x401e6d
cmp esi, ebx
jae 0x401e6f
mov esi, edx
mov eax, 0x3ff
sub esi, ebx
cmp esi, eax
cmova esi, eax
push esi
push ebx
push 0x475540
call fcn.00415ed0
add esp, 0xc
mov byte [esi + 0x475540], 0
jmp 0x401e9a
mov byte [0x475540], 0
mov eax, dword [edi + 0x8c]
mov ecx, dword [edi + 0x9c]
shl eax, 2
cmp ecx, eax
jle 0x401eb5
push ecx
push str.WARNING:_Invalid_hitboxes_number__d._n
jmp 0x401ecc
mov edx, dword [edi + 0xa0]
lea eax, [ecx + ecx*8]
lea eax, [edx + eax*8]
cmp eax, dword [edi + 0x48]
jbe 0x401ee3
push edx
push str.WARNING:_Invalid_hitboxes_offset__d._n
call fcn.00401070
mov eax, dword [0x475940]
add esp, 8
mov dword [eax + 0x9c], 0
mov ecx, dword [0x475124]
xor ebx, ebx
xor esi, esi
mov dword [esp + 0xc], ebx
mov dword [esp + 0x14], ebx
mov edi, dword [ecx + 0xb8]
add edi, ecx
cmp dword [ecx + 0xb4], ebx
jle 0x401f2e
nop word [eax + eax]
mov edx, 0x40
mov ecx, edi
call fcn.00406340
mov ecx, dword [0x475124]
inc esi
add edi, 0x50
cmp esi, dword [ecx + 0xb4]
jl 0x401f10
imul eax, esi, 0xffffffb0
mov dword [esp + 0x18], ebx
add edi, eax
cmp dword [ecx + 0xb4], ebx
jle 0x401fcb
mov ecx, edi
call fcn.00401160
test eax, eax
jne 0x401f66
inc ebx
push ebx
push str.MDLDEC_Texture_i.bmp
push 0x40
push edi
mov dword [esp + 0x1c], ebx
call fcn.004071e0
add esp, 0x10
jmp 0x401f8b
mov eax, dword [0x475124]
xor ecx, ecx
xor ebx, ebx
mov dword [esp + 0x10], ecx
mov esi, dword [eax + 0xb8]
add esi, eax
cmp dword [eax + 0xb4], ecx
jg 0x402054
mov ebx, dword [esp + 0xc]
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
add edi, 0x50
mov eax, dword [0x475124]
inc ecx
mov dword [esp + 0x18], ecx
cmp ecx, dword [eax + 0xb4]
jl 0x401f43
test ebx, ebx
je 0x401fba
push ebx
push str.WARNING:_Gived_name_to__i_protected_texture_s_._n
call fcn.00401070
add esp, 8
test esi, esi
je 0x401fcb
push str.WARNING:_Added_numeric_suffix_to_repeated_texture_name_s_.
call fcn.0041965c
add esp, 4
call fcn.00401380
call fcn.004015f0
mov eax, dword [0x475940]
xor ebx, ebx
xor edi, edi
mov esi, dword [eax + 0x90]
add esi, eax
cmp dword [eax + 0x8c], ebx
jle 0x402034
nop
mov ecx, esi
mov byte [esi + 0x1f], 0
call fcn.00401160
test eax, eax
jne 0x402011
inc edi
push edi
push str.MDLDEC_Bone_i
push 0x20
push esi
call fcn.004071e0
add esp, 0x10
mov eax, dword [0x475940]
inc ebx
add esi, 0x70
cmp ebx, dword [eax + 0x8c]
jl 0x401ff0
test edi, edi
je 0x402034
push edi
push str.WARNING:_Gived_name_to__i_protected_bone_s_._n
call fcn.00401070
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x850]
xor ecx, esp
call fcn.0040c692
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x10]
cmp ebx, dword [esp + 0x18]
je 0x4020af
test esi, esi
jne 0x402066
mov eax, edi
neg eax
sbb eax, eax
jmp 0x40207a
test edi, edi
je 0x4020af
push 0x40
push edi
push esi
call fcn.00433720
mov ecx, dword [esp + 0x1c]
add esp, 0xc
test eax, eax
jne 0x4020af
inc ecx
push ecx
push esi
push str._s__i.bmp
push 0x40
push esi
mov dword [esp + 0x24], ecx
call fcn.004071e0
add esp, 0x14
cmp eax, 0xffffffff
jne 0x4020af
push dword [esp + 0x10]
push ebx
push str.MDLDEC_Texture_i__i.bmp
push 0x40
push esi
call fcn.004071e0
add esp, 0x14
mov eax, dword [0x475124]
inc ebx
add esi, 0x50
cmp ebx, dword [eax + 0xb4]
jl 0x402050
mov eax, dword [esp + 0x10]
test eax, eax
jle 0x401f87
push eax
push edi
push str.WARNING:_Texture_name___s__is_repeated__i_times._n
call fcn.00401070
mov ebx, dword [esp + 0x18]
mov esi, 1
add esp, 0xc
mov dword [esp + 0x14], esi
jmp 0x401f8f
push ebx
push str.ERROR:_Wrong_file_size__File__s_may_be_corrupted__n
push 2
call fcn.00417cab
add esp, 4
push eax
call fcn.00401040
mov ecx, dword [esp + 0x868]
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040c692
mov esp, ebp
pop ebp
ret