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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
and esp, 0xfffffff8
sub esp, 0xcc
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x14]
mov dword [esp + 0x94], eax
mov eax, dword [eax + 4]
mov dword [esp + 0x84], ecx
mov ecx, dword [ecx + 4]
mov edx, dword [eax]
cmp edx, dword [ecx]
jne 0x6ca19a98
cmp byte [eax + 9], 4
jne 0x6ca19a80
cmp edx, 0x16372004
je 0x6ca19a80
test ebx, ebx
je 0x6ca19ad8
mov ecx, dword [ebx]
test ecx, ecx
js 0x6ca19ab0
mov edx, dword [ebx + 4]
test edx, edx
js 0x6ca19ab0
mov eax, dword [ebx + 8]
mov edi, dword [esp + 0x94]
add ecx, eax
cmp ecx, dword [edi + 8]
jg 0x6ca19ab0
mov ecx, dword [ebx + 0xc]
mov dword [esp + 0xa8], ecx
add edx, ecx
cmp edx, dword [edi + 0xc]
jg 0x6ca19ab0
test esi, esi
je 0x6ca19b20
mov edx, dword [esi]
test edx, edx
js 0x6ca19ac8
mov ecx, dword [esi + 4]
mov dword [esp + 0xa0], ecx
test ecx, ecx
js 0x6ca19ac8
mov ecx, dword [esi + 8]
mov edi, dword [esp + 0x84]
add edx, ecx
cmp edx, dword [edi + 8]
jg 0x6ca19ac8
mov edx, dword [esi + 0xc]
mov edi, dword [esp + 0xa0]
mov dword [esp + 0xa4], edx
add edi, edx
mov edx, dword [esp + 0x84]
cmp edi, dword [edx + 0xc]
jg 0x6ca19ac8
test ecx, ecx
jle 0x6ca1a307
mov edi, dword [esp + 0xa4]
test edi, edi
jle 0x6ca1a307
cmp eax, 0xffff
jg 0x6ca19a77
cmp edi, 0xffff
setg al
cmp ecx, 0xffff
setg dl
or dl, al
jne 0x6ca19a77
cmp dword [esp + 0xa8], 0xffff
jle 0x6ca1a318
mov dword [ebp + 8], 0x6ca930cb
jmp 0x6ca19a87
mov dword [ebp + 8], str.Wrong_format
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.6c942590
mov dword [ebp + 8], str.Only_works_with_same_format_surfaces
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.6c942590
mov dword [ebp + 8], str.Invalid_source_blit_rectangle
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.6c942590
mov dword [ebp + 8], str.Invalid_destination_blit_rectangle
jmp 0x6ca19a87
mov ebx, dword [esp + 0x94]
mov dword [esp + 0xac], 0
mov dword [esp + 0xb0], 0
mov eax, dword [ebx + 8]
mov ebx, dword [ebx + 0xc]
mov dword [esp + 0xb4], eax
mov dword [esp + 0xa8], ebx
mov dword [esp + 0xb8], ebx
lea ebx, [esp + 0xac]
jmp 0x6ca199d6
mov esi, dword [esp + 0x84]
mov dword [esp + 0xbc], 0
mov dword [esp + 0xc0], 0
mov ecx, dword [esi + 8]
mov esi, dword [esi + 0xc]
mov dword [esp + 0xc4], ecx
mov dword [esp + 0xa4], esi
mov dword [esp + 0xc8], esi
lea esi, [esp + 0xbc]
jmp 0x6ca19a32
mov esi, dword [esp + 0x58]
mov eax, dword [esp + 0x88]
mov dword [esp + 0x4c], ebx
imul eax, esi
add dword [esp + 0x3c], eax
mov eax, edi
sub eax, esi
sub eax, ebx
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0xa4]
shl edi, 2
sub eax, edi
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x54]
test eax, eax
jle 0x6ca1a2e4
mov eax, dword [esp + 0xa0]
mov ebx, dword [esp + 0x58]
mov ecx, dword [esp + 0x4c]
mov edi, dword [esp + 0x48]
lea esi, [eax*4 - 8]
lea eax, [ebx - 1]
mov dword [esp + 0x38], eax
lea eax, [ecx - 1]
mov dword [esp + 0x34], eax
lea eax, [edi - 1]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x24], esi
test eax, eax
je 0x6ca19e59
mov edx, dword [esp + 0x54]
mov dword [esp + 0x5c], 0
cmp edx, eax
cmovle eax, edx
mov dword [esp + 0x7c], eax
lea eax, [ebx*4]
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x74], eax
lea eax, [edi*4]
mov dword [esp + 0x70], eax
lea eax, [ecx*4]
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x2c]
add eax, ebx
mov dword [esp + 0x80], eax
add eax, esi
mov dword [esp + 0x6c], eax
lea esi, [esi]
mov eax, dword [esp + 0x58]
mov esi, dword [esp + 0x44]
add dword [esp + 0x50], esi
test eax, eax
je 0x6ca19ca3
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x68]
mov esi, edx
mov edx, dword [esp + 0x80]
lea esi, [esi]
movzx ebx, byte [edx + 1]
movzx ecx, byte [edx + 3]
add eax, 4
movzx edi, byte [edx]
mov dword [esp + 0xa8], ebx
movzx ebx, byte [edx + 2]
mov dword [esp + 0xa4], ecx
mov ecx, edi
mov byte [eax - 4], cl
movzx ecx, byte [esp + 0xa8]
mov byte [eax - 2], bl
movzx ebx, byte [esp + 0xa4]
mov byte [eax - 3], cl
mov byte [eax - 1], bl
sub esi, 1
jae 0x6ca19c58
mov esi, dword [esp + 0x74]
add dword [esp + 0x68], esi
mov eax, dword [esp + 0x48]
test eax, eax
je 0x6ca19dcc
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x68]
mov dword [esp + 0xa0], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0xa8], eax
lea esi, [esi]
mov ebx, dword [esp + 0xa0]
mov edi, dword [esp + 0x88]
add ecx, 4
sub dword [esp + 0xa8], 1
mov eax, ebx
mov edx, ebx
add ebx, edi
sar edx, 9
mov dword [esp + 0xa0], ebx
shr eax, 0x10
mov ebx, dword [esp + 0x80]
mov esi, edx
lea eax, [ebx + eax*4]
and esi, 0x7f
mov ebx, pe_nt_image_headers32
sub ebx, esi
movzx edi, byte [eax + 2]
movzx edx, byte [eax + 1]
mov dword [esp + 0xa4], ebx
movzx ebx, byte [eax + 6]
mov dword [esp + 0x90], edi
movzx edi, byte [eax + 3]
mov dword [esp + 0x9c], ebx
movzx ebx, byte [eax + 7]
mov dword [esp + 0x8c], edi
movzx edi, byte [eax + 5]
mov dword [esp + 0x98], ebx
movzx ebx, byte [eax]
movzx eax, byte [eax + 4]
imul ebx, dword [esp + 0xa4]
imul edi, esi
imul eax, esi
add ebx, eax
mov eax, dword [esp + 0x90]
shr ebx, 7
mov byte [ecx - 4], bl
mov ebx, dword [esp + 0xa4]
imul edx, ebx
imul eax, ebx
add edx, edi
shr edx, 7
mov byte [ecx - 3], dl
mov edx, dword [esp + 0x9c]
imul edx, esi
add eax, edx
mov edx, dword [esp + 0x98]
shr eax, 7
mov byte [ecx - 2], al
mov eax, dword [esp + 0x8c]
imul edx, esi
imul eax, ebx
add eax, edx
shr eax, 7
mov byte [ecx - 1], al
mov eax, dword [esp + 0xa8]
cmp eax, 0xffffffff
jne 0x6ca19cd0
mov esi, dword [esp + 0x70]
add dword [esp + 0x68], esi
mov edi, dword [esp + 0x4c]
test edi, edi
je 0x6ca19e34
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x68]
mov esi, edx
mov edx, dword [esp + 0x6c]
lea esi, [esi]
movzx ebx, byte [edx + 5]
movzx ecx, byte [edx + 7]
add eax, 4
movzx edi, byte [edx + 4]
mov dword [esp + 0xa8], ebx
movzx ebx, byte [edx + 6]
mov dword [esp + 0xa4], ecx
mov ecx, edi
mov byte [eax - 4], cl
movzx ecx, byte [esp + 0xa8]
mov byte [eax - 2], bl
movzx ebx, byte [esp + 0xa4]
mov byte [eax - 3], cl
mov byte [eax - 1], bl
sub esi, 1
jae 0x6ca19de8
mov esi, dword [esp + 0x78]
add dword [esp + 0x68], esi
add dword [esp + 0x5c], 1
mov esi, dword [esp + 0x40]
mov eax, dword [esp + 0x5c]
add dword [esp + 0x68], esi
cmp eax, dword [esp + 0x7c]
jl 0x6ca19c30
cmp dword [esp + 0x54], eax
jle 0x6ca1a2e4
mov eax, dword [esp + 0x64]
sub eax, 1
imul eax, dword [esp + 0x10]
add eax, dword [esp + 0x14]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x58]
shl eax, 2
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x48]
shl eax, 2
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x4c]
shl eax, 2
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x54]
sub eax, 1
sub eax, dword [esp + 0x60]
mov dword [esp + 0x28], eax
lea esi, [esi]
mov esi, dword [esp + 0x28]
cmp dword [esp + 0x5c], esi
jg 0x6ca1a4d0
mov esi, dword [esp + 0x50]
mov eax, esi
shr esi, 0x10
sar eax, 9
mov edx, esi
mov esi, dword [esp + 0x10]
and eax, 0x7f
mov ebx, eax
mov dword [esp + 0x98], eax
mov eax, pe_nt_image_headers32
sub eax, ebx
imul edx, esi
add edx, dword [esp + 0x14]
mov dword [esp + 0xa8], eax
mov eax, esi
mov ebx, dword [esp + 0x2c]
mov esi, dword [esp + 0x44]
add dword [esp + 0x50], esi
mov esi, dword [esp + 0x58]
add ebx, edx
add eax, ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], eax
mov ecx, eax
test esi, esi
je 0x6ca19fe7
mov eax, dword [esp + 0x38]
mov esi, dword [esp + 0x68]
mov dword [esp + 0xa4], eax
lea esi, [esi]
nop
movzx edx, byte [ecx + 1]
movzx eax, byte [ebx + 1]
add esi, 4
mov edi, dword [esp + 0x98]
imul eax, dword [esp + 0xa8]
sub dword [esp + 0xa4], 1
imul edx, edi
add eax, edx
movzx edx, byte [ecx + 2]
mov dword [esp + 0xa0], eax
movzx eax, byte [ebx + 2]
imul edx, edi
imul eax, dword [esp + 0xa8]
add eax, edx
movzx edx, byte [ebx + 3]
imul edx, dword [esp + 0xa8]
mov dword [esp + 0x9c], eax
movzx eax, byte [ecx + 3]
imul eax, edi
add eax, edx
movzx edx, byte [ecx]
and eax, 0x7f80
imul edx, edi
movzx edi, byte [ebx]
shr eax, 7
imul edi, dword [esp + 0xa8]
mov byte [esi - 1], al
mov eax, dword [esp + 0xa4]
add edx, edi
and edx, 0x7f80
shr edx, 7
mov byte [esi - 4], dl
mov edx, dword [esp + 0xa0]
and edx, 0x7f80
shr edx, 7
mov byte [esi - 3], dl
mov edx, dword [esp + 0x9c]
and edx, 0x7f80
shr edx, 7
mov byte [esi - 2], dl
cmp eax, 0xffffffff
jne 0x6ca19f20
mov esi, dword [esp + 0x18]
add dword [esp + 0x68], esi
mov ecx, dword [esp + 0x48]
test ecx, ecx
je 0x6ca1a1d1
mov eax, dword [esp + 0x3c]
mov esi, dword [esp + 0x68]
mov ebx, dword [esp + 0xa8]
mov dword [esp + 0x90], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x8c], esi
mov esi, dword [esp + 0x98]
mov dword [esp + 0xa0], eax
lea esi, [esi]
mov ecx, dword [esp + 0x90]
mov eax, ecx
mov edx, ecx
sar eax, 9
shr edx, 0x10
mov edi, eax
mov eax, dword [esp + 0x88]
shl edx, 2
and edi, 0x7f
add ecx, eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x9c], edi
mov dword [esp + 0x90], ecx
lea ecx, [eax + edx]
mov eax, pe_nt_image_headers32
add edx, dword [esp + 0x64]
sub eax, edi
movzx edi, byte [ecx + 1]
mov dword [esp + 0xa4], eax
movzx eax, byte [edx + 1]
imul edi, ebx
imul eax, esi
add eax, edi
movzx edi, byte [ecx + 2]
shr eax, 7
mov dword [esp + 0x6c], eax
movzx eax, byte [edx + 2]
imul edi, ebx
imul eax, esi
add eax, edi
movzx edi, byte [ecx + 3]
shr eax, 7
mov dword [esp + 0x70], eax
movzx eax, byte [edx + 3]
imul edi, ebx
imul eax, esi
add eax, edi
movzx edi, byte [ecx + 5]
shr eax, 7
mov dword [esp + 0x74], eax
movzx eax, byte [edx + 5]
imul edi, ebx
imul eax, esi
add eax, edi
mov edi, eax
movzx eax, byte [edx + 6]
shr edi, 7
mov dword [esp + 0x78], edi
movzx edi, byte [ecx + 6]
imul eax, esi
imul edi, ebx
add eax, edi
movzx edi, byte [ecx + 7]
shr eax, 7
mov dword [esp + 0x7c], eax
movzx eax, byte [edx + 7]
imul edi, ebx
imul eax, esi
add eax, edi
mov edi, eax
movzx eax, byte [edx + 4]
movzx edx, byte [edx]
shr edi, 7
mov dword [esp + 0x80], edi
movzx edi, byte [ecx + 4]
imul eax, esi
movzx ecx, byte [ecx]
imul edi, ebx
imul ecx, ebx
imul edx, esi
add eax, edi
mov edi, dword [esp + 0x9c]
shr eax, 7
add edx, ecx
movzx eax, al
mov ecx, dword [esp + 0x8c]
shr edx, 7
imul eax, edi
movzx edx, dl
imul edx, dword [esp + 0xa4]
add ecx, 4
add eax, edx
shr eax, 7
mov byte [ecx - 4], al
movzx eax, byte [esp + 0x78]
movzx edx, byte [esp + 0x6c]
imul edx, dword [esp + 0xa4]
imul eax, edi
sub dword [esp + 0xa0], 1
add eax, edx
movzx edx, byte [esp + 0x70]
imul edx, dword [esp + 0xa4]
shr eax, 7
mov byte [ecx - 3], al
movzx eax, byte [esp + 0x7c]
imul eax, edi
add eax, edx
movzx edx, byte [esp + 0x74]
imul edx, dword [esp + 0xa4]
shr eax, 7
mov byte [ecx - 2], al
movzx eax, byte [esp + 0x80]
imul eax, edi
add eax, edx
shr eax, 7
mov byte [ecx - 1], al
mov eax, dword [esp + 0xa0]
mov dword [esp + 0x8c], ecx
cmp eax, 0xffffffff
jne 0x6ca1a028
mov esi, dword [esp + 0x1c]
add dword [esp + 0x68], esi
mov edx, dword [esp + 0x4c]
test edx, edx
je 0x6ca1a2c9
mov eax, dword [esp + 0x24]
mov ebx, dword [esp + 0x60]
mov ecx, dword [esp + 0x64]
mov esi, dword [esp + 0x68]
add ebx, eax
add ecx, eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0xa4], eax
lea esi, [esi]
movzx edx, byte [ecx + 5]
movzx eax, byte [ebx + 5]
add esi, 4
mov edi, dword [esp + 0x98]
imul eax, dword [esp + 0xa8]
sub dword [esp + 0xa4], 1
imul edx, edi
add eax, edx
movzx edx, byte [ecx + 6]
mov dword [esp + 0xa0], eax
movzx eax, byte [ebx + 6]
imul edx, edi
imul eax, dword [esp + 0xa8]
add eax, edx
movzx edx, byte [ebx + 7]
imul edx, dword [esp + 0xa8]
mov dword [esp + 0x9c], eax
movzx eax, byte [ecx + 7]
imul eax, edi
add eax, edx
movzx edx, byte [ecx + 4]
and eax, 0x7f80
imul edx, edi
movzx edi, byte [ebx + 4]
shr eax, 7
imul edi, dword [esp + 0xa8]
mov byte [esi - 1], al
mov eax, dword [esp + 0xa4]
add edx, edi
and edx, 0x7f80
shr edx, 7
mov byte [esi - 4], dl
mov edx, dword [esp + 0xa0]
and edx, 0x7f80
shr edx, 7
mov byte [esi - 3], dl
mov edx, dword [esp + 0x9c]
and edx, 0x7f80
shr edx, 7
mov byte [esi - 2], dl
cmp eax, 0xffffffff
jne 0x6ca1a200
mov esi, dword [esp + 0x20]
add dword [esp + 0x68], esi
add dword [esp + 0x5c], 1
mov esi, dword [esp + 0x40]
mov eax, dword [esp + 0x5c]
add dword [esp + 0x68], esi
cmp dword [esp + 0x54], eax
jg 0x6ca19ea0
mov eax, dword [esp + 8]
test eax, eax
jne 0x6ca1a540
mov eax, dword [esp + 4]
test eax, eax
je 0x6ca1a307
mov eax, dword [esp + 0x94]
mov dword [esp], eax
call fcn.6ca1b050
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x84]
mov dword [esp + 8], 0
test byte [eax], 2
jne 0x6ca1a4f1
mov eax, dword [esp + 0x94]
mov dword [esp + 4], 0
test byte [eax], 2
jne 0x6ca1a515
mov eax, dword [esp + 0x94]
mov ecx, dword [ebx + 8]
mov edi, dword [esi + 8]
mov edx, dword [eax + 0x10]
mov eax, dword [eax + 0x14]
mov dword [esp + 0xa0], ecx
mov ecx, dword [ebx + 0xc]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 0x10], edx
imul edx, dword [ebx + 4]
mov eax, dword [eax + 0x10]
mov dword [esp + 0x64], ecx
mov dword [esp + 0xa4], eax
mov eax, dword [esi + 0xc]
mov dword [esp + 0x54], eax
mov eax, dword [ebx]
lea ebx, [edx + eax*4]
mov edx, dword [esp + 0xa4]
mov eax, dword [esi]
imul edx, dword [esi + 4]
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 0x84]
lea eax, [edx + eax*4]
add eax, dword [ebx + 0x14]
xor edx, edx
mov dword [esp + 0x68], eax
mov eax, ecx
shl eax, 0x10
div dword [esp + 0x54]
mov esi, eax
mov dword [esp + 0x44], eax
sar esi, 0x1f
add eax, 1
mov edx, esi
adc edx, 0
shrd eax, edx, 1
lea edx, [eax - 0x8000]
mov eax, dword [esp + 0x54]
mov dword [esp + 0x50], edx
test eax, eax
jle 0x6ca1a554
mov ebx, ecx
xor esi, esi
mov dword [esp + 0xa8], edi
mov eax, edx
sub ebx, 1
mov ecx, esi
mov dword [esp + 0x5c], 0
xor edx, edx
mov esi, dword [esp + 0x44]
mov edi, ebx
jmp 0x6ca1a42a
mov ebx, eax
shr ebx, 0x10
cmp ebx, edi
setge bl
movzx ebx, bl
add ecx, ebx
add eax, esi
add edx, 1
cmp dword [esp + 0x54], edx
je 0x6ca1a435
test eax, eax
jns 0x6ca1a410
add dword [esp + 0x5c], 1
jmp 0x6ca1a41f
mov dword [esp + 0x60], ecx
mov edi, dword [esp + 0xa8]
mov ecx, dword [esp + 0xa0]
xor edx, edx
mov eax, ecx
shl eax, 0x10
div edi
mov esi, eax
mov dword [esp + 0x88], eax
sar esi, 0x1f
add eax, 1
mov edx, esi
adc edx, 0
shrd eax, edx, 1
lea ebx, [eax - 0x8000]
mov dword [esp + 0x3c], ebx
test edi, edi
jle 0x6ca1a569
mov eax, ebx
lea ebx, [ecx - 1]
mov dword [esp + 0x58], 0
xor edx, edx
mov dword [esp + 0xa8], ebx
mov esi, dword [esp + 0x88]
xor ebx, ebx
jmp 0x6ca1a4c1
mov ecx, eax
shr ecx, 0x10
cmp ecx, dword [esp + 0xa8]
setge cl
movzx ecx, cl
add ebx, ecx
add edx, 1
add eax, esi
cmp edi, edx
je 0x6ca19b64
test eax, eax
jns 0x6ca1a4a0
add dword [esp + 0x58], 1
jmp 0x6ca1a4b4
mov dword [esp + 0xa8], pe_nt_image_headers32
mov edx, dword [esp + 0xc]
xor eax, eax
mov dword [esp + 0x98], 0
jmp 0x6ca19ee3
mov dword [esp], eax
call fcn.6ca1b000
mov dword [esp + 8], 1
test eax, eax
jns 0x6ca1a330
mov dword [ebp + 8], str.Unable_to_lock_destination_surface
jmp 0x6ca19a87
mov dword [esp], eax
call fcn.6ca1b000
mov dword [esp + 4], 1
test eax, eax
jns 0x6ca1a348
cmp dword [esp + 8], 0
jne 0x6ca1a582
mov dword [ebp + 8], str.Unable_to_lock_source_surface
jmp 0x6ca19a87
mov eax, dword [esp + 0x84]
mov dword [esp], eax
call fcn.6ca1b050
jmp 0x6ca1a2f0
mov dword [esp + 0x60], 0
mov dword [esp + 0x5c], 0
jmp 0x6ca1a440
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], 0
mov dword [esp + 0x58], 0
jmp 0x6ca19b84
mov eax, dword [esp + 0x84]
mov dword [esp], eax
call fcn.6ca1b050
jmp 0x6ca1a534