Function at 0x57e1e0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x60
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x6bd53c], eax
je 0x57e20a
push 0
push 0x185
push str..Source_r3dTex.cpp
push str.gMainThreadID__GetCurrentThreadId__
call fcn.0056b7e0
add esp, 0x10
mov ecx, dword [esp + 0x64]
push ebx
push ebp
push esi
push edi
call fcn.0056ebf0
mov ebp, dword [esp + 0x78]
lea ecx, [esp + 0x30]
mov ebx, eax
mov eax, dword [ebx]
mov edx, dword [eax + 0x44]
push ecx
push ebp
push ebx
call edx
mov esi, eax
test esi, esi
je 0x57e255
mov ecx, dword [0x6b89e4]
push esi
call fcn.0056f0e0
push 0x18b
push str..Source_r3dTex.cpp
push esi
push str.D3D_call_failed___d__in_file__s_line__d._D3D_Call:tex2D__GetLevelDesc__mipsDown__desc__
call fcn.0056b6a0
add esp, 0x10
mov eax, dword [ebx]
mov ecx, dword [eax + 0x34]
push ebx
call ecx
mov ecx, dword [0x6b89e4]
mov esi, eax
add ecx, 0x50
sub esi, ebp
call fcn.0056dff0
mov edx, dword [eax]
mov edx, dword [edx + 0x5c]
push 0
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x84]
push ecx
mov ecx, dword [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x5c]
push 0
push esi
push ecx
mov ecx, dword [esp + 0x64]
push ecx
push eax
call edx
mov ecx, dword [0x6b89e4]
mov edi, eax
push edi
call fcn.0056f0e0
test edi, edi
je 0x57e2f0
cmp edi, 0x8007000e
jne 0x57e2b9
push str.DownTex2D:_out_of_memory__n
jmp 0x57e2c6
cmp edi, 0x8876017c
jne 0x57e2ce
push str.DownTex2D:_out_VIDEO_memory__n
call fcn.0056b4d0
add esp, 4
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x4c]
push eax
mov eax, dword [esp + 0x4c]
push ecx
push esi
push edx
push eax
push str.DownTex2D:_CreateTexture_call_failed:_Width___d__Height___d__mips___d__format___d__pool___d_n
call fcn.0056b6a0
add esp, 0x18
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x34]
push eax
xor edi, edi
call edx
mov dword [esp + 0x1c], eax
test eax, eax
jle 0x57e578
lea ebx, [ebx]
cmp dword [esp + 0x7c], 0
mov eax, dword [ebx]
jne 0x57e3fd
mov eax, dword [eax + 0x48]
lea ecx, [esp + 0x14]
push ecx
lea edx, [edi + ebp]
push edx
push ebx
call eax
mov esi, eax
test esi, esi
je 0x57e356
mov ecx, dword [0x6b89e4]
push esi
call fcn.0056f0e0
push 0x1ad
push str..Source_r3dTex.cpp
push esi
push str.D3D_call_failed___d__in_file__s_line__d._D3D_Call:tex2D__GetSurfaceLevel__i__mipsDown___sourceSurf__
call fcn.0056b6a0
add esp, 0x10
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edx
push edi
push eax
mov eax, dword [ecx + 0x48]
call eax
mov esi, eax
test esi, esi
je 0x57e392
mov ecx, dword [0x6b89e4]
push esi
call fcn.0056f0e0
push 0x1ae
push str..Source_r3dTex.cpp
push esi
push str.D3D_call_failed___d__in_file__s_line__d._D3D_Call:res__GetSurfaceLevel__i___targSurf__
call fcn.0056b6a0
add esp, 0x10
mov ecx, dword [0x6b89e4]
add ecx, 0x50
call fcn.0056dff0
mov edx, dword [esp + 0x18]
mov ecx, dword [eax]
push 0
push edx
mov edx, dword [esp + 0x1c]
push 0
push edx
push eax
mov eax, dword [ecx + 0x78]
call eax
mov esi, eax
test esi, esi
je 0x57e3e0
mov ecx, dword [0x6b89e4]
push esi
call fcn.0056f0e0
push 0x1b0
push str..Source_r3dTex.cpp
push esi
push str.D3D_call_failed___d__in_file__s_line__d._D3D_Call:r3dRenderer__pd3ddev__UpdateSurface__sourceSurf__NULL__targSurf__NULL__
call fcn.0056b6a0
add esp, 0x10
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
jmp 0x57e56d
mov edx, dword [eax + 0x4c]
push 0x10
push 0
lea ecx, [esp + 0x30]
push ecx
add ebp, edi
push ebp
push ebx
call edx
mov esi, eax
test esi, esi
je 0x57e439
mov ecx, dword [0x6b89e4]
push esi
call fcn.0056f0e0
push 0x1b9
push str..Source_r3dTex.cpp
push esi
push str.D3D_call_failed___d__in_file__s_line__d._D3D_Call:tex2D__LockRect__i__mipsDown__from__NULL__D3DLOCK_READONLY__
call fcn.0056b6a0
add esp, 0x10
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
push 0
push 0
lea edx, [esp + 0x28]
push edx
push edi
push eax
mov eax, dword [ecx + 0x4c]
call eax
mov esi, eax
test esi, esi
je 0x57e479
mov ecx, dword [0x6b89e4]
push esi
call fcn.0056f0e0
push 0x1ba
push str..Source_r3dTex.cpp
push esi
push str.D3D_call_failed___d__in_file__s_line__d._D3D_Call:res__LockRect__i__to__NULL__0__
call fcn.0056b6a0
add esp, 0x10
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
lea edx, [esp + 0x50]
push edx
push edi
push eax
mov eax, dword [ecx + 0x44]
call eax
mov esi, eax
test esi, esi
je 0x57e4b5
mov ecx, dword [0x6b89e4]
push esi
call fcn.0056f0e0
push 0x1be
push str..Source_r3dTex.cpp
push esi
push str.D3D_call_failed___d__in_file__s_line__d._D3D_Call:res__GetLevelDesc__i__desc__
call fcn.0056b6a0
add esp, 0x10
mov ecx, dword [esp + 0x28]
cmp ecx, dword [esp + 0x20]
je 0x57e4d8
push 0
push 0x1c0
push str..Source_r3dTex.cpp
push str.from.Pitch__to.Pitch
call fcn.0056b7e0
add esp, 0x10
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x6c]
push edx
push eax
call fcn.0056b480
imul eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x2c]
push eax
push ecx
push edx
call fcn.00594e80
mov eax, dword [ebx]
mov ecx, dword [eax + 0x50]
add esp, 0x14
push ebp
push ebx
call ecx
mov esi, eax
test esi, esi
je 0x57e532
mov ecx, dword [0x6b89e4]
push esi
call fcn.0056f0e0
push 0x1c3
push str..Source_r3dTex.cpp
push esi
push str.D3D_call_failed___d__in_file__s_line__d._D3D_Call:tex2D__UnlockRect__i__mipsDown__
call fcn.0056b6a0
add esp, 0x10
mov eax, dword [esp + 0x10]
mov edx, dword [eax]
push edi
push eax
mov eax, dword [edx + 0x50]
call eax
mov esi, eax
test esi, esi
je 0x57e569
mov ecx, dword [0x6b89e4]
push esi
call fcn.0056f0e0
push 0x1c4
push str..Source_r3dTex.cpp
push esi
push str.D3D_call_failed___d__in_file__s_line__d._D3D_Call:res__UnlockRect__i__
call fcn.0056b6a0
add esp, 0x10
mov ebp, dword [esp + 0x78]
inc edi
cmp edi, dword [esp + 0x1c]
jl 0x57e310
mov edi, dword [esp + 0x74]
mov ecx, edi
call fcn.0056e1c0
mov esi, dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x6bd53c], eax
je 0x57e5ae
push 0
push 0x4a0
push str.c:warz_srceternityinclude_r3dRender.h
push str.gMainThreadID__GetCurrentThreadId__
call fcn.0056b7e0
add esp, 0x10
mov dword [edi], esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret