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

Disassembly:
sub esp, 0x60
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x6c4538], eax
je 0x59d11a
push 0
push 0x182
push str.Source_r3dTex.cpp
push str.gMainThreadID__GetCurrentThreadId__
call fcn.0058e630
add esp, 0x10
mov ecx, dword [esp + 0x64]
push ebx
push ebp
push esi
call fcn.00590c50
mov ebp, dword [esp + 0x74]
mov ebx, eax
lea eax, [esp + 0x2c]
push eax
push ebp
mov ecx, dword [ebx]
push ebx
call dword [ecx + 0x44]
mov esi, eax
test esi, esi
je 0x59d162
mov ecx, dword [0x6bfb4c]
push esi
call fcn.00590e10
push 0x188
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.0058dd80
add esp, 0x10
mov eax, dword [ebx]
push edi
push ebx
call dword [eax + 0x34]
mov ecx, dword [0x6bfb4c]
mov edi, eax
add ecx, 0x50
sub edi, ebp
call fcn.00590850
push 0
lea edx, [esp + 0x14]
push edx
push dword [esp + 0x84]
mov ecx, dword [eax]
push dword [esp + 0x3c]
push 0
push edi
push dword [esp + 0x64]
push dword [esp + 0x64]
push eax
call dword [ecx + 0x5c]
mov ecx, dword [0x6bfb4c]
mov esi, eax
push esi
call fcn.00590e10
test esi, esi
je 0x59d1f2
cmp esi, 0x8007000e
jne 0x59d1bf
push str.DownTex2D:_out_of_memory__n
jmp 0x59d1cc
cmp esi, 0x8876017c
jne 0x59d1d4
push str.DownTex2D:_out_VIDEO_memory__n
call fcn.0058e160
add esp, 4
push dword [esp + 0x3c]
push dword [esp + 0x34]
push edi
push dword [esp + 0x58]
push dword [esp + 0x58]
push str.DownTex2D:_CreateTexture_call_failed:_Width___d__Height___d__mips___d__format___d__pool___d_n
call fcn.0058dd80
add esp, 0x18
mov eax, dword [esp + 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x34]
xor esi, esi
mov dword [esp + 0x1c], eax
test eax, eax
jle 0x59d460
lea ebx, [ebx]
cmp dword [esp + 0x7c], 0
jne 0x59d2f1
mov ecx, dword [ebx]
lea eax, [esp + 0x14]
push eax
lea eax, [esi + ebp]
push eax
push ebx
call dword [ecx + 0x48]
mov edi, eax
test edi, edi
je 0x59d254
mov ecx, dword [0x6bfb4c]
push edi
call fcn.00590e10
push 0x1aa
push str.Source_r3dTex.cpp
push edi
push str.D3D_call_failed___d__in_file__s_line__d._D3D_Call:tex2D__GetSurfaceLevel__i__mipsDown___sourceSurf__
call fcn.0058dd80
add esp, 0x10
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x18]
push edx
push esi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x48]
mov edi, eax
test edi, edi
je 0x59d28e
mov ecx, dword [0x6bfb4c]
push edi
call fcn.00590e10
push 0x1ab
push str.Source_r3dTex.cpp
push edi
push str.D3D_call_failed___d__in_file__s_line__d._D3D_Call:res__GetSurfaceLevel__i___targSurf__
call fcn.0058dd80
add esp, 0x10
mov ecx, dword [0x6bfb4c]
lea ecx, [ecx + 0x50]
call fcn.00590850
push 0
push dword [esp + 0x1c]
mov ecx, dword [eax]
push 0
push dword [esp + 0x20]
push eax
call dword [ecx + 0x78]
mov edi, eax
test edi, edi
je 0x59d2d8
mov ecx, dword [0x6bfb4c]
push edi
call fcn.00590e10
push 0x1ad
push str.Source_r3dTex.cpp
push edi
push str.D3D_call_failed___d__in_file__s_line__d._D3D_Call:r3dRenderer__pd3ddev__UpdateSurface__sourceSurf__NULL__targSurf__NULL__
call fcn.0058dd80
add esp, 0x10
mov eax, dword [esp + 0x14]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [esp + 0x18]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
jmp 0x59d455
mov eax, dword [ebx]
lea ecx, [esp + 0x28]
push 0x10
push 0
push ecx
add ebp, esi
push ebp
push ebx
call dword [eax + 0x4c]
mov edi, eax
test edi, edi
je 0x59d32d
mov ecx, dword [0x6bfb4c]
push edi
call fcn.00590e10
push 0x1b6
push str.Source_r3dTex.cpp
push edi
push str.D3D_call_failed___d__in_file__s_line__d._D3D_Call:tex2D__LockRect__i__mipsDown__from__NULL__D3DLOCK_READONLY__
call fcn.0058dd80
add esp, 0x10
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x20]
push 0
push 0
push edx
mov ecx, dword [eax]
push esi
push eax
call dword [ecx + 0x4c]
mov edi, eax
test edi, edi
je 0x59d36b
mov ecx, dword [0x6bfb4c]
push edi
call fcn.00590e10
push 0x1b7
push str.Source_r3dTex.cpp
push edi
push str.D3D_call_failed___d__in_file__s_line__d._D3D_Call:res__LockRect__i__to__NULL__0__
call fcn.0058dd80
add esp, 0x10
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x50]
push edx
push esi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x44]
mov edi, eax
test edi, edi
je 0x59d3a5
mov ecx, dword [0x6bfb4c]
push edi
call fcn.00590e10
push 0x1bb
push str.Source_r3dTex.cpp
push edi
push str.D3D_call_failed___d__in_file__s_line__d._D3D_Call:res__GetLevelDesc__i__desc__
call fcn.0058dd80
add esp, 0x10
mov eax, dword [esp + 0x28]
cmp eax, dword [esp + 0x20]
je 0x59d3c8
push 0
push 0x1bd
push str.Source_r3dTex.cpp
push str.from.Pitch__to.Pitch
call fcn.0058e630
add esp, 0x10
push dword [esp + 0x50]
push dword [esp + 0x70]
call fcn.0058deb0
imul eax, dword [esp + 0x28]
push eax
push dword [esp + 0x38]
push dword [esp + 0x34]
call fcn.005b6e60
mov eax, dword [ebx]
add esp, 0x14
push ebp
push ebx
call dword [eax + 0x50]
mov edi, eax
test edi, edi
je 0x59d41c
mov ecx, dword [0x6bfb4c]
push edi
call fcn.00590e10
push 0x1c0
push str.Source_r3dTex.cpp
push edi
push str.D3D_call_failed___d__in_file__s_line__d._D3D_Call:tex2D__UnlockRect__i__mipsDown__
call fcn.0058dd80
add esp, 0x10
mov eax, dword [esp + 0x10]
push esi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x50]
mov edi, eax
test edi, edi
je 0x59d451
mov ecx, dword [0x6bfb4c]
push edi
call fcn.00590e10
push 0x1c1
push str.Source_r3dTex.cpp
push edi
push str.D3D_call_failed___d__in_file__s_line__d._D3D_Call:res__UnlockRect__i__
call fcn.0058dd80
add esp, 0x10
mov ebp, dword [esp + 0x78]
inc esi
cmp esi, dword [esp + 0x1c]
jl 0x59d210
mov ebx, dword [esp + 0x74]
mov ecx, ebx
call fcn.00592fe0
mov esi, dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
pop edi
cmp dword [0x6c4538], eax
je 0x59d497
push 0
push 0x4a0
push str.c:infectzmmo_srceternityinclude_r3dRender.h
push str.gMainThreadID__GetCurrentThreadId__
call fcn.0058e630
add esp, 0x10
mov dword [ebx], esi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret