Function at 0x10006c70
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1007be6d
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x1009400c]
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 edi, edx
mov esi, ecx
push str.Diffuse_Map
push 0xff000064
call dword [sym.imp.d3d9.dll_D3DPERF_BeginEvent]
push 4
mov dword [ebp - 0x28], 0
lea ecx, [ebp - 0x28]
push str..dds
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
call fcn.10004a90
lea edx, [ebp - 0x28]
mov dword [ebp - 4], 0
mov ecx, esi
call fcn.10005a00
mov dword [ebp - 4], 0xffffffff
mov bl, al
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x10006d27
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10006d1d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10006d1d
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.1004d7a1
add esp, 8
test bl, bl
mov ebx, dword [sym.imp.d3d9.dll_D3DPERF_EndEvent]
je 0x10006d50
cmp dword [edi + 0x14], 0x10
jb 0x10006d39
mov edi, dword [edi]
cmp dword [esi + 0x14], 0x10
jb 0x10006d41
mov esi, dword [esi]
push 0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileA]
jmp 0x10006e60
push str.Generating_DDS_Diffuse_Map
push 0xff000064
call dword [sym.imp.d3d9.dll_D3DPERF_BeginEvent]
cmp dword [esi + 0x14], 0x10
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x50], 0
jb 0x10006d76
mov esi, dword [esi]
lea eax, [ebp - 0x4c]
push eax
push 0
push 0
push 0
push 5
push 3
push 1
push 0xfffffffffffffffd
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
push esi
push dword [0x101f3f18]
call dword [sym.imp.d3dx9_43.dll_D3DXCreateTextureFromFileExA]
mov eax, dword [ebp - 0x4c]
lea edx, [ebp - 0x48]
push edx
push 0
push eax
mov ecx, dword [eax]
call dword [ecx + 0x44]
lea eax, [ebp - 0x50]
push eax
push 1
push 0x31545844
push 0
push 0xffffffffffffffff
push dword [ebp - 0x2c]
push dword [ebp - 0x30]
push dword [0x101f3f18]
call dword [sym.imp.d3dx9_43.dll_D3DXCreateTexture]
mov eax, dword [ebp - 0x4c]
xor esi, esi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x34]
test eax, eax
je 0x10006e42
nop dword [eax]
mov eax, dword [ebp - 0x4c]
lea edx, [ebp - 0x54]
push edx
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x58], 0
mov ecx, dword [eax]
push esi
push eax
call dword [ecx + 0x48]
mov eax, dword [ebp - 0x50]
lea edx, [ebp - 0x58]
push edx
push esi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x48]
push 0
push 1
push 0
push 0
push dword [ebp - 0x54]
push 0
push 0
push dword [ebp - 0x58]
call dword [sym.imp.d3dx9_43.dll_D3DXLoadSurfaceFromSurface]
mov eax, dword [ebp - 0x54]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 0x58]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 0x4c]
inc esi
push eax
mov edx, dword [eax]
call dword [edx + 0x34]
cmp esi, eax
jb 0x10006de0
mov edx, dword [ebp - 0x50]
mov ecx, edi
call fcn.10006bc0
mov eax, dword [ebp - 0x4c]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 0x50]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
call ebx
call ebx
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.1004d763
mov esp, ebp
pop ebp
ret