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

Disassembly:
push 0xffffffffffffffff
push 0x515036
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xe8
push ebx
push ebp
mov ebp, dword [esp + 0x100]
mov eax, dword [ebp + 0x14]
push esi
xor esi, esi
push edi
mov edi, dword [esp + 0x10c]
cmp edi, esi
mov ebx, ecx
mov ecx, dword [ebp + 0x10]
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x6c], esi
mov dword [esp + 0x70], esi
mov dword [esp + 0x74], ecx
mov dword [esp + 0x78], eax
jne 0x4a4b7e
lea eax, [esp + 0x6c]
mov dword [esp + 0x10c], eax
mov edi, eax
jmp 0x4a4bc6
cmp dword [ebx + 0x130], 1
je 0x4a4bc6
push 0x215
push str.engineTexture.cpp
push str.Texture::copyImageData
push str.scaleFactor1
push str.Assertion_failed.
push ecx
mov ecx, esp
mov dword [esp + 0x2c], esp
push 0x51fa70
call fcn.00402110
mov ecx, dword [0x55cd0c]
mov edx, dword [ecx + 0x860]
push edx
call fcn.0044ce20
add esp, 0x1c
mov dword [esp + 0x5c], esi
mov dword [esp + 0x60], esi
mov esi, dword [esp + 0x110]
test esi, esi
jne 0x4a4bdd
lea esi, [esp + 0x5c]
mov ecx, dword [edi]
mov eax, dword [edi + 8]
mov edx, dword [esi]
sub eax, ecx
mov ecx, dword [ebx + 0x128]
add eax, edx
cmp eax, ecx
jg 0x4a4c09
mov eax, dword [edi + 4]
mov ecx, dword [edi + 0xc]
mov edx, dword [esi + 4]
sub ecx, eax
mov eax, dword [ebx + 0x12c]
add ecx, edx
cmp ecx, eax
jle 0x4a4c48
push 0x21d
push str.engineTexture.cpp
push str.Texture::copyImageData
push str.destPoint__xsourceRect__Width___realWidth__destPoint__ysourceRect__Height___realHeight
push str.Assertion_failed.
push ecx
mov ecx, esp
mov dword [esp + 0x2c], esp
push 0x51fa70
call fcn.00402110
mov edx, dword [0x55cd0c]
mov eax, dword [edx + 0x860]
push eax
call fcn.0044ce20
add esp, 0x1c
mov ecx, dword [ebp + 0x18]
mov eax, dword [ebx + 0x88]
push 0
push 1
mov dword [esp + 0x70], ecx
lea ecx, [esp + 0x84]
push ecx
push 0
mov dword [esp + 0x8c], 0x7c
mov edx, dword [eax]
push eax
call dword [edx + 0x64]
xor ebp, ebp
cmp eax, ebp
jge 0x4a4d01
push 0x223
push str.engineTexture.cpp
push str.Texture::copyImageData
push str.dxTexture__Lock_NULL__ddsd__DDLOCK_WAIT___NULL_
push eax
mov eax, dword [0x55cd0c]
mov ecx, dword [eax + 0x860]
lea edx, [esp + 0x28]
push edx
call fcn.0044d000
mov ecx, dword [eax]
push ecx
push ecx
mov ecx, esp
mov dword [esp + 0x68], esp
push 0x51fa70
mov dword [esp + 0x11c], ebp
call fcn.00402110
mov edx, dword [0x55cd0c]
mov eax, dword [edx + 0x860]
push eax
call fcn.0044ce20
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
add esp, 0x1c
mov dword [esp + 0x100], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a4d01
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0xd0]
mov ecx, dword [esi + 4]
imul ecx, dword [esp + 0x8c]
mov edx, dword [esp + 0xa0]
mov edi, dword [esp + 0xdc]
shr eax, 3
imul eax, dword [esi]
mov esi, dword [esp + 0xd8]
add edx, eax
mov eax, dword [esp + 0xd4]
add ecx, edx
mov edx, dword [esp + 0xe0]
mov dword [esp + 0x14], edx
mov edx, 8
mov dword [esp + 0x40], edx
mov dword [esp + 0x30], edx
xor edx, edx
xor ebx, ebx
test eax, eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x64], eax
mov dword [esp + 0x5c], esi
mov dword [esp + 0x50], edi
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], 8
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], 8
mov dword [esp + 0x1c], ebx
je 0x4a4dc3
lea esp, [esp]
test al, 1
jne 0x4a4da1
shr eax, 1
inc ebp
test eax, eax
jne 0x4a4d90
mov dword [esp + 0x3c], ebp
jmp 0x4a4dc3
test eax, eax
mov dword [esp + 0x3c], ebp
je 0x4a4dc3
lea esp, [esp]
mov ebx, dword [esp + 0x40]
dec ebx
shr eax, 1
test eax, eax
mov dword [esp + 0x40], ebx
jne 0x4a4db0
mov ebx, dword [esp + 0x1c]
test esi, esi
mov eax, esi
je 0x4a4dff
lea esp, [esp]
test al, 1
jne 0x4a4de1
shr eax, 1
inc edx
test eax, eax
jne 0x4a4dd0
mov dword [esp + 0x34], edx
jmp 0x4a4dff
test eax, eax
mov dword [esp + 0x34], edx
je 0x4a4dff
lea esp, [esp]
mov ebp, dword [esp + 0x30]
dec ebp
shr eax, 1
test eax, eax
mov dword [esp + 0x30], ebp
jne 0x4a4df0
test edi, edi
mov eax, edi
je 0x4a4e3f
mov edx, dword [esp + 0x24]
lea esp, [esp]
test al, 1
jne 0x4a4e21
shr eax, 1
inc edx
test eax, eax
jne 0x4a4e10
mov dword [esp + 0x24], edx
jmp 0x4a4e3f
test eax, eax
mov dword [esp + 0x24], edx
je 0x4a4e3f
lea esp, [esp]
mov edi, dword [esp + 0x38]
dec edi
shr eax, 1
test eax, eax
mov dword [esp + 0x38], edi
jne 0x4a4e30
mov eax, dword [esp + 0xe0]
test eax, eax
je 0x4a4e7f
lea ebx, [ebx]
test al, 1
jne 0x4a4e61
shr eax, 1
inc ebx
test eax, eax
jne 0x4a4e50
mov dword [esp + 0x1c], ebx
jmp 0x4a4e7f
test eax, eax
mov dword [esp + 0x1c], ebx
je 0x4a4e7f
lea esp, [esp]
mov edi, dword [esp + 0x28]
dec edi
shr eax, 1
test eax, eax
mov dword [esp + 0x28], edi
jne 0x4a4e70
mov esi, dword [esp + 0x10c]
mov eax, dword [esp + 0xd0]
mov edx, dword [esi + 4]
cmp eax, 0x20
mov eax, dword [esi + 0xc]
mov dword [esp + 0x18], edx
jne 0x4a4fb7
cmp edx, eax
jae 0x4a50cf
mov eax, dword [esi + 8]
jmp 0x4a4eb0
mov ebp, dword [esi]
cmp ebp, eax
mov dword [esp + 0x20], ecx
jae 0x4a4f95
movzx eax, byte [esp + 0x40]
movzx ecx, byte [esp + 0x30]
mov dword [esp + 0x44], eax
movzx eax, byte [esp + 0x38]
mov dword [esp + 0x54], ecx
movzx ecx, byte [esp + 0x28]
mov dword [esp + 0x58], eax
mov dword [esp + 0x48], ecx
mov eax, dword [esp + 0x108]
mov ecx, dword [eax + 0x10]
imul ecx, edx
mov edx, dword [esp + 0x68]
add ecx, ebp
mov ebx, dword [edx + ecx*4]
mov cl, byte [esp + 0x44]
mov eax, ebx
shr eax, 0x18
mov byte [esp + 0x13], al
mov eax, ebx
shr eax, 0x10
movzx eax, al
shr eax, cl
mov ecx, dword [esp + 0x3c]
movzx edi, byte [esp + 0x13]
shl eax, cl
mov ecx, dword [esp + 0x64]
mov edx, ebx
shr edx, 8
and eax, ecx
mov cl, byte [esp + 0x54]
movzx edx, dl
shr edx, cl
mov ecx, dword [esp + 0x34]
movzx esi, bl
shl edx, cl
mov ecx, dword [esp + 0x5c]
mov ebx, dword [esp + 0x14]
and edx, ecx
mov cl, byte [esp + 0x58]
shr esi, cl
mov ecx, dword [esp + 0x24]
shl esi, cl
and esi, dword [esp + 0x50]
mov cl, byte [esp + 0x48]
shr edi, cl
mov ecx, dword [esp + 0x1c]
shl edi, cl
and edi, ebx
add edi, esi
add edi, edx
mov edx, dword [esp + 0x18]
add edi, eax
mov eax, dword [esp + 0x20]
add eax, 4
mov dword [eax - 4], edi
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x10c]
mov eax, dword [eax + 8]
inc ebp
cmp ebp, eax
jb 0x4a4ee2
mov esi, dword [esp + 0x10c]
mov ecx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x8c]
mov edi, dword [esi + 0xc]
add ecx, ebp
inc edx
cmp edx, edi
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x18], edx
jb 0x4a4eb0
jmp 0x4a50cf
cmp edx, eax
jae 0x4a50cf
mov eax, dword [esi + 8]
mov ebp, dword [esi]
cmp ebp, eax
mov dword [esp + 0x20], ecx
jae 0x4a50b2
movzx ecx, byte [esp + 0x40]
movzx eax, byte [esp + 0x30]
mov dword [esp + 0x44], ecx
movzx ecx, byte [esp + 0x38]
mov dword [esp + 0x54], eax
movzx eax, byte [esp + 0x28]
mov dword [esp + 0x58], ecx
mov dword [esp + 0x48], eax
jmp 0x4a5000
mov ecx, dword [esp + 0x108]
mov eax, dword [ecx + 0x10]
imul eax, edx
mov ecx, dword [esp + 0x68]
add eax, ebp
mov ebx, dword [ecx + eax*4]
mov cl, byte [esp + 0x44]
mov eax, ebx
shr eax, 0x18
mov byte [esp + 0x13], al
mov eax, ebx
shr eax, 0x10
movzx eax, al
shr eax, cl
mov ecx, dword [esp + 0x3c]
movzx edi, byte [esp + 0x13]
shl eax, cl
mov ecx, dword [esp + 0x64]
mov edx, ebx
shr edx, 8
and eax, ecx
mov cl, byte [esp + 0x54]
movzx edx, dl
shr edx, cl
mov ecx, dword [esp + 0x34]
movzx esi, bl
shl edx, cl
and edx, dword [esp + 0x5c]
mov cl, byte [esp + 0x58]
shr esi, cl
mov ecx, dword [esp + 0x24]
add edx, eax
mov eax, dword [esp + 0x20]
shl esi, cl
mov ecx, dword [esp + 0x50]
add eax, 2
mov dword [esp + 0x20], eax
and esi, ecx
mov cl, byte [esp + 0x48]
shr edi, cl
mov ecx, dword [esp + 0x1c]
add edx, esi
shl edi, cl
and edi, dword [esp + 0x14]
add edx, edi
mov word [eax - 2], dx
mov eax, dword [esp + 0x10c]
mov eax, dword [eax + 8]
mov edx, dword [esp + 0x18]
inc ebp
cmp ebp, eax
jb 0x4a5000
mov esi, dword [esp + 0x10c]
mov ecx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x8c]
mov edi, dword [esi + 0xc]
add ecx, ebp
inc edx
cmp edx, edi
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x18], edx
jb 0x4a4fc2
mov ecx, dword [esp + 0x4c]
mov eax, dword [ecx + 0x88]
mov edx, dword [eax]
push 0
push eax
call dword [edx + 0x80]
test eax, eax
jge 0x4a5173
mov ecx, dword [0x55cd0c]
mov ecx, dword [ecx + 0x860]
push 0x27c
push str.engineTexture.cpp
push str.Texture::copyImageData
push str.dxTexture__Unlock_NULL_
push eax
lea eax, [esp + 0x60]
push eax
call fcn.0044d000
mov edx, dword [eax]
push edx
push ecx
mov ecx, esp
mov dword [esp + 0x2c], esp
push 0x51fa70
mov dword [esp + 0x11c], 1
call fcn.00402110
mov eax, dword [0x55cd0c]
mov ecx, dword [eax + 0x860]
push ecx
call fcn.0044ce20
mov eax, dword [esp + 0x68]
add eax, 0xfffffff0
add esp, 0x1c
mov dword [esp + 0x100], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4a5173
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0xf8]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0xf4
ret 0xc