Function at 0x40f090
Capabilities:
Print debug messages

Disassembly:
mov eax, dword [0x5d5a00]
sub esp, 0x60
test eax, eax
push ebx
push ebp
push esi
push edi
jne 0x40f0aa
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x60
ret
mov eax, dword [0x5d5a0c]
test eax, eax
jne 0x40f0bd
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x60
ret
mov eax, dword [0x5c4308]
test eax, eax
jne 0x40f12e
mov eax, dword [esp + 0xa4]
mov ecx, dword [esp + 0xa0]
mov edx, dword [esp + 0x9c]
push eax
mov eax, dword [esp + 0x9c]
push ecx
mov ecx, dword [esp + 0x94]
push edx
mov edx, dword [esp + 0x94]
push eax
mov eax, dword [esp + 0x94]
push ecx
mov ecx, dword [esp + 0x94]
push edx
mov edx, dword [esp + 0x94]
push eax
mov eax, dword [esp + 0x94]
push ecx
mov ecx, dword [esp + 0x94]
push edx
push eax
push ecx
call fcn.0040ed80
add esp, 0x2c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret
mov eax, dword [0x5d5a54]
mov edi, 1
test eax, eax
je 0x40f143
mov edi, dword [esp + 0x94]
mov ebp, dword [esp + 0x88]
test ebp, ebp
jne 0x40f1af
mov edx, dword [esp + 0xa4]
mov eax, dword [esp + 0xa0]
mov ecx, dword [esp + 0x9c]
push edx
mov edx, dword [esp + 0x9c]
push eax
mov eax, dword [esp + 0x94]
push ecx
mov ecx, dword [esp + 0x90]
push edx
mov edx, dword [esp + 0x90]
push eax
mov eax, dword [esp + 0x90]
push ebp
push ecx
mov ecx, dword [esp + 0x94]
push edx
mov edx, dword [esp + 0x94]
push eax
push ecx
push edx
call fcn.0040ed80
add esp, 0x2c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret
mov eax, dword [esp + 0x90]
test eax, eax
jge 0x40f1c5
mov dword [esp + 0x90], 0
test edi, edi
jge 0x40f1cd
xor edi, edi
jmp 0x40f1d7
cmp edi, 8
jle 0x40f1d7
mov edi, 8
cmp dword [esp + 0x90], 8
jl 0x40f1ec
mov dword [esp + 0x90], 7
push 0x40
call fcn.005095d5
push 0xc
mov esi, eax
call fcn.005095d5
mov ecx, dword [esp + 0x7c]
mov dword [esi + 4], eax
push 0xc
mov edx, dword [ecx]
mov dword [eax], edx
mov eax, dword [esi + 4]
mov edx, dword [ecx + 4]
mov dword [eax + 4], edx
mov eax, dword [esi + 4]
mov ecx, dword [ecx + 8]
mov dword [eax + 8], ecx
call fcn.005095d5
mov ecx, dword [esp + 0x84]
mov dword [esi + 8], eax
push 0xc
mov edx, dword [ecx]
mov dword [eax], edx
mov eax, dword [esi + 8]
mov edx, dword [ecx + 4]
mov dword [eax + 4], edx
mov eax, dword [esi + 8]
mov ecx, dword [ecx + 8]
mov dword [eax + 8], ecx
call fcn.005095d5
mov ecx, dword [esp + 0x8c]
mov dword [esi + 0xc], eax
push 0xc
mov edx, dword [ecx]
mov dword [eax], edx
mov eax, dword [esi + 0xc]
mov edx, dword [ecx + 4]
mov dword [eax + 4], edx
mov eax, dword [esi + 0xc]
mov ecx, dword [ecx + 8]
mov dword [eax + 8], ecx
call fcn.005095d5
mov ecx, dword [esp + 0x94]
mov dword [esi + 0x10], eax
mov ebx, dword [esp + 0xa0]
add esp, 0x14
mov edx, dword [ecx]
mov dword [eax], edx
mov eax, dword [esi + 0x10]
mov edx, dword [ecx + 4]
mov dword [eax + 4], edx
mov eax, dword [esi + 0x10]
mov ecx, dword [ecx + 8]
mov edx, dword [esp + 0x84]
mov dword [eax + 8], ecx
mov dword [esi + 0x14], edx
lea edx, [esi + 0x1c]
xor eax, eax
sub edx, ebp
cmp ebx, eax
jne 0x40f314
mov eax, ebp
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x40f2af
mov eax, dword [esp + 0xa4]
mov ecx, dword [esp + 0xa0]
mov ebx, dword [esp + 0x9c]
mov ebp, dword [esp + 0x98]
mov edx, dword [esp + 0x90]
push eax
mov eax, dword [esp + 0x8c]
push ecx
push ebx
push ebp
push edi
push edx
push eax
call fcn.0042ae50
add esp, 0x1c
mov dword [esi + 0x34], eax
test eax, eax
mov dword [esi + 0x38], eax
je 0x40f308
mov dword [esi + 0x18], 1
jmp 0x40f41b
mov dword [esi + 0x18], 0
jmp 0x40f41b
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov eax, ebp
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x40f31e
mov ebp, dword [esp + 0x98]
mov dword [esp + 0x94], 0
test ebx, ebx
mov ebx, dword [esp + 0x9c]
jle 0x40f405
mov ecx, dword [esp + 0x94]
mov edx, dword [esp + 0x88]
push ecx
push edx
lea eax, [esp + 0x38]
push str._s_02d
push eax
call fcn.00508ac6
mov eax, dword [esp + 0xa4]
add esp, 0x10
test eax, eax
jne 0x40f3a7
mov ecx, dword [esp + 0xa4]
mov edx, dword [esp + 0xa0]
mov eax, dword [esp + 0x90]
push ecx
push edx
push ebx
push ebp
push edi
lea ecx, [esp + 0x44]
push eax
push ecx
call fcn.0042ae50
add esp, 0x1c
mov dword [esi + 0x38], eax
test eax, eax
je 0x40f405
jmp 0x40f3da
mov edx, dword [esp + 0xa4]
mov eax, dword [esp + 0xa0]
mov ecx, dword [esp + 0x90]
push edx
push eax
push ebx
push ebp
push edi
lea edx, [esp + 0x44]
push ecx
push edx
call fcn.0042ae50
add esp, 0x1c
test eax, eax
je 0x40f405
mov ecx, dword [esp + 0x10]
mov dword [ecx + 0x64], eax
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x8c]
inc eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x94]
inc eax
cmp eax, ecx
mov dword [esp + 0x94], eax
jl 0x40f349
mov eax, dword [esi + 0x38]
test eax, eax
jne 0x40f411
mov dword [esi + 0x18], eax
jmp 0x40f418
mov edx, dword [esp + 0x14]
mov dword [esi + 0x18], edx
mov dword [esi + 0x34], eax
mov eax, dword [esi + 0x18]
test eax, eax
jne 0x40f4d7
lea edi, [esi + 0x1c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 0x18
jbe 0x40f443
push str.Texture_name_too_long____should_be___24___n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea eax, [esi + 0x1c]
lea edx, [esp + 0x18]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x40f44c
mov eax, dword [esi + 4]
push eax
call fcn.005089dd
mov ecx, dword [esi + 8]
push ecx
call fcn.005089dd
mov edx, dword [esi + 0xc]
push edx
call fcn.005089dd
mov eax, dword [esi + 0x10]
push eax
call fcn.005089dd
push esi
call fcn.005089dd
mov ecx, dword [esp + 0xb8]
mov edx, dword [esp + 0xb4]
mov eax, dword [esp + 0xa0]
push ecx
push edx
mov edx, dword [esp + 0xa0]
push ebx
push ebp
lea ecx, [esp + 0x3c]
push eax
mov eax, dword [esp + 0xa8]
push ecx
mov ecx, dword [esp + 0xa8]
push edx
mov edx, dword [esp + 0xa8]
push eax
mov eax, dword [esp + 0xa8]
push ecx
push edx
push eax
call fcn.0040ed80
add esp, 0x40
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret
mov ecx, dword [0x5d5a0c]
push esi
push ecx
call fcn.0041c030
mov dword [esi + 0x3c], eax
mov ecx, dword [0x7f01e0]
add esp, 8
xor eax, eax
test ecx, ecx
jle 0x40f506
mov edx, dword [eax*4 + 0x7e5be0]
test edx, edx
je 0x40f506
inc eax
cmp eax, ecx
jl 0x40f4f6
cmp eax, ecx
jne 0x40f530
cmp ecx, 0x1400
jl 0x40f529
push str.No_more_material_available.__MAT01_
call fcn.00410c20
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret
inc ecx
mov dword [0x7f01e0], ecx
mov dword [eax*4 + 0x7e5be0], esi
mov dword [esi], eax
pop edi
pop esi
pop ebp
or eax, 0x3000000
pop ebx
add esp, 0x60
ret