Function at 0x1005cc70
Capabilities:
Check if file exists
Create directory
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6b4
mov eax, dword [0x102d4a48]
xor eax, esp
mov dword [esp + 0x6b0], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0x10], eax
lea esi, [ebx + 0x3c]
nop dword [eax]
call dword [0x10405e44]
cmp dword [0x103f7cc0], 0
je 0x1005ccca
push edi
push str.dll_gfx:_load_texture_0x_x_n
push dword [0x104072b0]
push 0
push str.TRACE
call fcn.10067cf0
add esp, 0x14
test edi, edi
jne 0x1005ccd6
call dword [0x10405e54]
mov edi, eax
mov eax, dword [edi + 4]
test eax, eax
jne 0x1005ccf3
push eax
push 0x102affba
push 1
push 0x14
call dword [0x10405e38]
add esp, 0x10
mov dword [edi + 4], eax
cmp dword [edi + 0x7c], 0
jne 0x1005cd2e
mov ecx, dword [ebx + 0x30]
test ecx, ecx
je 0x1005cd04
add ecx, ecx
jmp 0x1005cd09
mov ecx, 1
mov dword [eax], ecx
mov eax, dword [edi + 4]
push 0
push 0x102affba
push 4
push dword [eax]
call dword [0x10405e38]
add esp, 0x10
mov dword [edi + 0x7c], eax
inc dword [0x10405e00]
mov eax, dword [edi + 4]
mov edx, dword [ebx + 0x30]
mov ecx, dword [eax]
lea eax, [edx + edx]
cmp ecx, eax
je 0x1005cd51
test edx, edx
jne 0x1005cd43
cmp ecx, 1
je 0x1005cd51
push edi
call fcn.1005c760
add esp, 4
jmp 0x1005cca0
mov eax, dword [esp + 0x10]
mov dword [edi + 0x84], ebx
mov dword [edi + 0x80], eax
cmp dword [ebx], 0x64
je 0x1005d229
mov edx, dword [ebx + 0x30]
xor ecx, ecx
test edx, edx
je 0x1005cd87
mov eax, dword [edi + 0x88]
cmp eax, 0xffffffff
cmovne ecx, eax
mov dword [ebx + 0xd0], ecx
jmp 0x1005cd91
mov dword [ebx + 0xd0], 0
mov eax, dword [edi + 4]
mov eax, dword [eax]
cmp ecx, eax
jb 0x1005cdd7
push eax
push ecx
push str.tried_to_use_non_existent_palette___i___i__n
push dword [0x104072b4]
push 0
push str.UNEXPECTED
call fcn.10067cf0
add esp, 0x18
mov dword [ebx + 0xd0], 0
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x6b0]
xor ecx, esp
call fcn.1008a9cb
mov esp, ebp
pop ebp
ret
cmp edx, 1
jbe 0x1005cdf7
cmp dword [edi + 0x8c], 0
jne 0x1005cdf7
mov eax, dword [esp + 0x10]
push edi
push ebx
push dword [eax + 0x28]
call dword [0x10405e40]
add esp, 0xc
cmp dword [esi + 0x20], 0
jne 0x1005ce03
mov eax, dword [ebx + 0x34]
mov dword [esi + 0x20], eax
cmp dword [esp + 0x10], 0
je 0x1005d1f8
cmp dword [ebx + 0xd4], 0
je 0x1005d1f8
mov ecx, dword [ebx + 0xd0]
mov eax, dword [edi + 0x7c]
cmp dword [eax + ecx*4], 0
je 0x1005ce37
mov eax, dword [edi + 4]
cmp dword [eax + 0xc], 1
jne 0x1005d2f2
cmp dword [ebx], 0x64
jne 0x1005ce4c
mov edx, dword [ebx + 0x1c]
mov dword [esp + 0x10], edx
mov edx, dword [ebx + 0x20]
mov dword [esp + 0x20], edx
jmp 0x1005ce59
mov eax, dword [esi]
mov dword [esp + 0x10], eax
mov eax, dword [esi + 4]
mov dword [esp + 0x20], eax
mov eax, dword [ebx + 0x34]
imul eax, ecx
cmp dword [esi + 0x28], 0x10
mov dword [esp + 0x14], 0
mov dword [esp + 0x24], eax
jne 0x1005cec1
cmp dword [esi + 0x4c], 0x8000
jne 0x1005cec1
mov dword [esi + 0x48], 0x1f
mov dword [esi + 0x44], 0x3e0
mov dword [esi + 0x40], 0x7c00
mov dword [esi + 0x58], 0
mov dword [esi + 0x54], 5
mov dword [esi + 0x50], 0xa
mov dword [esi + 0x78], 0x1f
mov dword [esi + 0x74], 0x1f
mov dword [esi + 0x70], 0x1f
mov dword [esp + 0x14], 1
mov eax, dword [edi + 4]
cmp dword [eax + 0xc], 0
jne 0x1005cee0
push ebx
push edi
xor edx, edx
xor ecx, ecx
call fcn.1005c890
add esp, 8
test eax, eax
jne 0x1005d2f2
mov eax, dword [esp + 0x20]
imul eax, dword [esp + 0x10]
shl eax, 2
push eax
mov dword [esp + 0x20], eax
call fcn.10092b15
mov ecx, dword [ebx + 8]
add esp, 4
cmp dword [ebx + 0xbc], 0
mov dword [esp + 0x18], eax
je 0x1005cf19
mov edx, dword [ebx + 0xc0]
mov ecx, dword [ebx + 0xd0]
movsx ecx, byte [edx + ecx]
test eax, eax
je 0x1005cf40
push ecx
push dword [esp + 0x28]
mov edx, eax
push ecx
push dword [esp + 0x20]
mov ecx, dword [ebx + 0xd4]
push esi
push dword [esp + 0x34]
push dword [esp + 0x28]
call fcn.1005c9e0
add esp, 0x1c
mov eax, dword [edi + 4]
cmp dword [eax + 0xc], 0
je 0x1005cf70
cmp dword [0x103f7cdc], 2
jne 0x1005d1d5
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
push ebx
push edi
call fcn.1005c890
add esp, 8
test eax, eax
jne 0x1005d1d5
cmp dword [edi], 0
mov eax, dword [ebx + 0xd0]
mov dword [esp + 0x34], eax
mov eax, dword [edi + 0x84]
je 0x1005cf8d
mov esi, dword [edi + 8]
mov eax, dword [edi + 0xc]
jmp 0x1005cfa0
cmp dword [eax], 0x64
jne 0x1005cf9a
mov esi, dword [eax + 0x1c]
mov eax, dword [eax + 0x20]
jmp 0x1005cfa0
mov esi, dword [eax + 0x3c]
mov eax, dword [eax + 0x40]
mov ecx, dword [0x10405bc8]
mov dword [esp + 0x14], eax
cmp esi, ecx
ja 0x1005cfb2
cmp eax, ecx
jbe 0x1005cfdb
push str.unknown
xor eax, eax
cmp dword [0x103f7c80], eax
push str.texture_dimensions_exceed_max_texture_size__will_not_be_able_to_load__s_n
push dword [0x104072a8]
setne al
push eax
push str.ERROR
call fcn.10067cf0
add esp, 0x14
lea eax, [esp + 0x24]
push eax
push 1
call dword [sym.imp.OPENGL32.dll_glGenTextures]
push dword [esp + 0x24]
push 0xde1
call dword [sym.imp.OPENGL32.dll_glBindTexture]
mov eax, dword [esp + 0x24]
push 0
push 0x813d
push 0xde1
mov dword [esp + 0x34], eax
call dword [sym.imp.OPENGL32.dll_glTexParameteri]
push dword [esp + 0x18]
push 0x1401
push 0x80e1
push 0
push dword [esp + 0x24]
push esi
push 0x8058
push 0
push 0xde1
call dword [sym.imp.OPENGL32.dll_glTexImage2D]
mov ecx, dword [edi + 0x7c]
mov esi, dword [esp + 0x34]
cmp dword [ecx + esi*4], 0
je 0x1005d07f
cmp dword [edi], 0
je 0x1005d070
mov eax, dword [edi + 4]
cmp dword [eax + 0xc], 0
jne 0x1005d070
push str.oops__may_have_messed_up_an_external_texture_n
push dword [0x104072b8]
push 0
push str.GLITCH
call fcn.10067cf0
mov ecx, dword [edi + 0x7c]
add esp, 0x10
lea eax, [ecx + esi*4]
push eax
push 1
call dword [sym.imp.OPENGL32.dll_glDeleteTextures]
mov ecx, dword [edi + 0x7c]
cmp dword [0x103f7c64], 0
mov eax, dword [esp + 0x28]
mov dword [ecx + esi*4], eax
je 0x1005d1d5
mov esi, dword [ebx + 0x28]
cmp esi, 0x20
jbe 0x1005d1d5
mov eax, dword [edi + 4]
mov ebx, dword [ebx + 0xd0]
cmp dword [eax + 0xc], 0
je 0x1005d0ed
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x28]
mov ecx, dword [esp + 0x18]
push eax
push 0
call fcn.10058c40
push dword [esp + 0x34]
lea eax, [esp + 0xc4]
push dword [esp + 0x34]
push ebx
push esi
push 0x104072c0
push str._sThe_Reunion_Saved_Textures__s__02i__llx.png
push 0x600
push eax
call fcn.10059d90
add esp, 0x28
jmp 0x1005d10e
push ebx
push esi
push 0x104072c0
push str._sThe_Reunion_Saved_Textures__s__02i.png
lea eax, [esp + 0xc8]
push 0x600
push eax
call fcn.10059d90
add esp, 0x18
lea eax, [esp + 0xb8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x1005d1d5
lea eax, [esp + 0xb8]
push 0x2f
push eax
call fcn.1008ba50
mov esi, eax
add esp, 8
test esi, esi
je 0x1005d194
nop dword [eax]
cmp byte [esi], 0x2f
jne 0x1005d14b
inc esi
cmp byte [esi], 0x2f
je 0x1005d145
lea eax, [esp + 0xb8]
mov ebx, esi
sub ebx, eax
push ebx
push eax
lea eax, [esp + 0x40]
push eax
call fcn.1008e7d0
add esp, 0xc
cmp ebx, 0x80
jae 0x1005d309
lea eax, [esp + 0x38]
mov byte [esp + ebx + 0x38], 0
push eax
call fcn.1009cc07
add esp, 4
push 0x2f
push esi
call fcn.1008ba50
mov esi, eax
add esp, 8
test esi, esi
jne 0x1005d140
push dword [esp + 0x18]
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0xbc]
push dword [esp + 0x24]
call fcn.10069fc0
add esp, 8
test eax, eax
jne 0x1005d1d5
cmp dword [0x103f7c80], eax
push str.save_texture_failed_n
push dword [0x104072a8]
setne al
push eax
push str.ERROR
call fcn.10067cf0
add esp, 0x10
push dword [esp + 0x18]
call fcn.10092afa
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x6b0]
xor ecx, esp
call fcn.1008a9cb
mov esp, ebp
pop ebp
ret
push str.no_texture_format_specified_or_no_source_data_n
push dword [0x104072b4]
push 0
push str.UNEXPECTED
call fcn.10067cf0
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x6b0]
xor ecx, esp
call fcn.1008a9cb
mov esp, ebp
pop ebp
ret
cmp dword [0x103f7cc0], 0
je 0x1005d24d
push edi
push str.load_framebuffer_texture:_0x_x_n
push dword [0x104072b0]
push 0
push str.TRACE
call fcn.10067cf0
add esp, 0x14
push 0x40000
call dword [sym.imp.OPENGL32.dll_glPushAttrib]
lea eax, [esp + 0x1c]
push eax
push 1
call dword [sym.imp.OPENGL32.dll_glGenTextures]
push dword [esp + 0x1c]
push 0xde1
call dword [sym.imp.OPENGL32.dll_glBindTexture]
mov eax, dword [esp + 0x1c]
mov esi, dword [sym.imp.OPENGL32.dll_glTexParameteri]
push 0x2600
push 0x2800
push 0xde1
mov dword [esp + 0x34], eax
call esi
push 0x2600
push 0x2801
push 0xde1
call esi
cmp dword [0x103f7d1c], 0
mov eax, dword [ebx + 0x20]
mov ecx, dword [ebx + 0x1c]
mov edx, dword [ebx + 0x18]
mov esi, dword [ebx + 0x14]
push 0
push eax
push ecx
jne 0x1005d2cf
mov eax, dword [0x103f7cf4]
add eax, edx
push eax
mov eax, dword [0x103f7d2c]
add eax, esi
push eax
jmp 0x1005d2d1
push edx
push esi
push 0x1908
push 0
push 0xde1
call dword [sym.imp.OPENGL32.dll_glCopyTexImage2D]
mov eax, dword [edi + 0x7c]
mov ecx, dword [esp + 0x28]
mov dword [eax], ecx
call dword [sym.imp.OPENGL32.dll_glPopAttrib]
mov ecx, dword [esp + 0x6bc]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1008a9cb
mov esp, ebp
pop ebp
ret
call fcn.1008aafb
int3