Function at 0x4f6430
Capabilities:
Check for software breakpoints

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4b8
call fcn.004e51e0
mov dword [ebp - 0x4a4], eax
test eax, eax
je 0x4f70dc
mov ebx, dword [ebp - 0x4a4]
mov eax, dword [ebx]
mov dword [esp], ebx
mov dword [esp + 8], 8
mov dword [esp + 4], 0
call dword [eax + 0x50]
sub esp, 0xc
mov ebx, eax
mov eax, 0x397c
call fcn.004e5d30
mov dword [esp + 8], ebx
not ebx
shr ebx, 0x1f
mov dword [esp + 4], str.Failed_to_set_cooperative_level__hr__lx._n
mov dword [esp], ebx
call fcn.004e6560
mov dword [ebp - 0x4a8], 0
xor eax, eax
mov ecx, 0x1b
lea edi, [ebp - 0x478]
mov ebx, dword [ebp - 0x4a4]
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x4a8]
mov dword [ebp - 0x488], 0x7c
lea esi, [ebp - 0x494]
mov dword [ebp - 0x484], 7
mov edi, dword [eax*8 + 0x5867d4]
mov dword [ebp - 0x480], pe_nt_image_headers32
mov dword [ebp - 0x47c], pe_nt_image_headers32
mov dword [ebp - 0x420], edi
mov eax, dword [ebx]
mov dword [esp + 8], esi
lea esi, [ebp - 0x488]
mov dword [esp + 0xc], 0
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [eax + 0x18]
sub esp, 0x10
test eax, eax
js 0x4f70b0
mov eax, dword [ebp - 0x494]
lea ecx, [ebp - 0x48c]
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], 0x55dbf0
mov dword [esp], eax
call dword [edx]
sub esp, 0xc
mov esi, eax
call fcn.0054f6e0
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x398c
mov eax, dword [ebp - 0x4a8]
mov dword [esp + 8], esi
mov ebx, dword [eax*8 + 0x5867d8]
xor eax, eax
test esi, esi
mov dword [esp + 4], str.Failed_to_query_IDirectDrawSurface__hr__lx__type__s._n
sete al
mov dword [esp], eax
mov dword [esp + 0xc], ebx
call fcn.004e6560
mov eax, dword [ebp - 0x494]
lea ecx, [ebp - 0x490]
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], 0x55dbd0
mov dword [esp], eax
call dword [edx]
sub esp, 0xc
mov esi, eax
call fcn.0054f6e0
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x398e
xor eax, eax
test esi, esi
sete al
mov dword [esp + 0xc], ebx
mov dword [esp + 8], esi
mov dword [esp + 4], str.Failed_to_query_IDirectDrawSurface3__hr__lx__type__s._n
mov dword [esp], eax
call fcn.004e6560
mov dword [ebp - 0x4a0], edi
xor edx, edx
mov dword [ebp - 0x498], ebx
lea esi, [esi]
nop
mov ebx, dword [edx*4 + str.lmk6_]
xor eax, eax
mov ecx, 0x100
lea edi, [ebp - 0x40c]
rep stosd dword es:[edi], eax
mov esi, 0x80070057
mov dword [ebp - 0x49c], edx
lea edx, [ebp - 0x40c]
cmp ebx, 0x6c
mov dword [ebp - 0x40c], ebx
cmove esi, eax
mov eax, dword [ebp - 0x48c]
mov ecx, dword [eax]
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [ecx + 0x58]
sub esp, 8
mov edi, eax
call fcn.0054f6e0
mov ecx, dword [ebp - 0x498]
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x3997
xor eax, eax
cmp esi, edi
sete al
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
lea edi, [ebp - 0x40c]
mov dword [esp], eax
mov dword [esp + 0x10], ebx
mov dword [esp + 4], str.Got_hr__lx__expected__lx__size__u__type__s._n
call fcn.004e6560
xor eax, eax
mov ecx, 0x100
lea edx, [ebp - 0x40c]
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x490]
mov dword [ebp - 0x40c], ebx
mov ecx, dword [eax]
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [ecx + 0x58]
sub esp, 8
mov edi, eax
call fcn.0054f6e0
mov ecx, dword [ebp - 0x498]
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x399e
xor eax, eax
cmp esi, edi
sete al
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
lea edi, [ebp - 0x40c]
mov dword [esp], eax
mov dword [esp + 0x10], ebx
mov dword [esp + 4], str.Got_hr__lx__expected__lx__size__u__type__s._n
call fcn.004e6560
xor eax, eax
mov ecx, 0x100
cmp ebx, 0x7c
rep stosd dword es:[edi], eax
mov edi, 0x80070057
mov dword [ebp - 0x40c], ebx
lea edx, [ebp - 0x40c]
cmove edi, eax
mov eax, dword [ebp - 0x494]
mov ecx, dword [eax]
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [ecx + 0x58]
sub esp, 8
mov esi, eax
call fcn.0054f6e0
mov ecx, dword [ebp - 0x498]
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x39a5
xor eax, eax
cmp edi, esi
sete al
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], edi
mov dword [esp + 8], esi
mov dword [esp + 4], str.Got_hr__lx__expected__lx__size__u__type__s._n
mov dword [esp], eax
call fcn.004e6560
mov edx, dword [ebp - 0x49c]
add edx, 1
cmp edx, 0xf
jne 0x4f65e8
mov edi, dword [ebp - 0x4a0]
xor esi, esi
mov ebx, dword [ebp - 0x498]
mov dword [ebp - 0x498], 0
mov eax, edi
shr eax, 0xe
xor eax, 1
and eax, 1
and edi, 0x1000
cmove eax, esi
mov dword [ebp - 0x4a0], eax
jmp 0x4f6ae1
xor eax, eax
mov ecx, 0x100
lea edi, [ebp - 0x40c]
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x490]
mov dword [ebp - 0x40c], esi
lea ecx, [ebp - 0x40c]
mov dword [ebp - 0x394], 0xdeadbeef
mov byte [ebp - 0x390], 0xef
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x64]
sub esp, 0x14
mov edi, eax
call fcn.0054f6e0
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x39d2
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], esi
mov eax, dword [ebp - 0x49c]
mov dword [esp + 8], edi
cmp eax, edi
mov dword [esp + 0xc], eax
sete al
mov dword [esp + 4], str.Got_hr__lx__expected__lx__size__u__type__s._n
movzx eax, al
mov dword [esp], eax
call fcn.004e6560
call fcn.0054f6e0
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x39d4
mov eax, dword [ebp - 0x40c]
mov dword [esp + 0x10], ebx
cmp esi, eax
mov dword [esp + 0xc], eax
sete al
mov dword [esp + 8], esi
movzx eax, al
mov dword [esp + 4], str.dwSize_was_changed_from__u_to__lu__type__s._n
mov dword [esp], eax
call fcn.004e6560
call fcn.0054f6e0
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x39d6
movzx edx, byte [ebp - 0x390]
mov dword [esp + 0x10], ebx
cmp dl, 0xef
mov dword [esp + 0xc], esi
sete al
mov dword [esp + 8], edx
movzx eax, al
mov dword [esp + 4], str.Got_unexpected_byte__02x__size__u__type__s._n
mov dword [esp], eax
call fcn.004e6560
test edi, edi
jns 0x4f6d70
xor eax, eax
mov ecx, 0x100
lea edi, [ebp - 0x40c]
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x494]
mov dword [ebp - 0x40c], esi
lea ecx, [ebp - 0x40c]
mov dword [ebp - 0x394], 0xdeadbeef
mov byte [ebp - 0x390], 0xef
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x64]
sub esp, 0x14
mov edi, eax
call fcn.0054f6e0
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x39ec
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], esi
mov eax, dword [ebp - 0x49c]
mov dword [esp + 8], edi
cmp eax, edi
mov dword [esp + 0xc], eax
sete al
mov dword [esp + 4], str.Got_hr__lx__expected__lx__size__u__type__s._n
movzx eax, al
mov dword [esp], eax
call fcn.004e6560
call fcn.0054f6e0
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x39ee
mov eax, dword [ebp - 0x40c]
mov dword [esp + 0x10], ebx
cmp esi, eax
mov dword [esp + 0xc], eax
sete al
mov dword [esp + 8], esi
movzx eax, al
mov dword [esp + 4], str.dwSize_was_changed_from__u_to__lu__type__s._n
mov dword [esp], eax
call fcn.004e6560
call fcn.0054f6e0
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x39f0
movzx edx, byte [ebp - 0x390]
mov dword [esp + 0x10], ebx
cmp dl, 0xef
mov dword [esp + 0xc], esi
sete al
mov dword [esp + 8], edx
movzx eax, al
mov dword [esp + 4], str.Got_unexpected_byte__02x__size__u__type__s._n
mov dword [esp], eax
call fcn.004e6560
test edi, edi
js 0x4f6acb
call fcn.0054f6e0
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x39f4
mov eax, dword [ebp - 0x400]
mov dword [esp + 0x10], ebx
cmp eax, 0x80
mov dword [esp + 8], eax
sete al
mov dword [esp + 0xc], esi
movzx eax, al
mov dword [esp + 4], str.Got_unexpected_width__lu__size__u__type__s._n
mov dword [esp], eax
call fcn.004e6560
call fcn.0054f6e0
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x39f6
mov eax, dword [ebp - 0x404]
mov dword [esp + 0x10], ebx
cmp eax, 0x80
mov dword [esp + 8], eax
sete al
mov dword [esp + 0xc], esi
movzx eax, al
mov dword [esp + 4], str.Got_unexpected_height__lu__size__u__type__s._n
mov dword [esp], eax
call fcn.004e6560
cmp esi, 0x7c
sbb edi, edi
call fcn.0054f6e0
and edi, 0xdeadbeef
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x39f9
mov eax, dword [ebp - 0x394]
mov dword [esp + 0x10], ebx
cmp eax, edi
mov dword [esp + 8], eax
sete al
mov dword [esp + 0xc], esi
movzx eax, al
mov dword [esp + 4], str.Got_unexpected_texture_stage__lx__size__u__type__s._n
mov dword [esp], eax
call fcn.004e6560
mov eax, dword [ebp - 0x494]
mov edx, dword [eax]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + pe_nt_image_headers32]
sub esp, 8
add dword [ebp - 0x498], 1
mov eax, dword [ebp - 0x498]
cmp eax, 0xf
je 0x4f6ee0
mov eax, dword [ebp - 0x498]
mov ecx, 0x100
lea edi, [ebp - 0x40c]
mov esi, dword [eax*4 + str.lmk6_]
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x48c]
mov byte [ebp - 0x390], 0xef
lea ecx, [ebp - 0x40c]
mov dword [ebp - 0x40c], esi
mov dword [ebp - 0x394], 0xdeadbeef
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x64]
mov ecx, dword [ebp - 0x4a0]
mov edi, eax
mov eax, esi
sub esp, 0x14
and eax, 0xffffffef
cmp eax, 0x6c
sete al
movzx eax, al
or eax, ecx
cmp eax, 1
sbb eax, eax
and eax, 0x80070057
mov dword [ebp - 0x49c], eax
call fcn.0054f6e0
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x39b8
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], esi
mov eax, dword [ebp - 0x49c]
mov dword [esp + 8], edi
cmp eax, edi
mov dword [esp + 0xc], eax
sete al
mov dword [esp + 4], str.Got_hr__lx__expected__lx__size__u__type__s._n
movzx eax, al
mov dword [esp], eax
call fcn.004e6560
call fcn.0054f6e0
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x39ba
mov eax, dword [ebp - 0x40c]
mov dword [esp + 0x10], ebx
cmp esi, eax
mov dword [esp + 0xc], eax
sete al
mov dword [esp + 8], esi
movzx eax, al
mov dword [esp + 4], str.dwSize_was_changed_from__u_to__lu__type__s._n
mov dword [esp], eax
call fcn.004e6560
call fcn.0054f6e0
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x39bc
movzx edx, byte [ebp - 0x390]
mov dword [esp + 0x10], ebx
cmp dl, 0xef
mov dword [esp + 0xc], esi
sete al
mov dword [esp + 8], edx
movzx eax, al
mov dword [esp + 4], str.Got_unexpected_byte__02x__size__u__type__s._n
mov dword [esp], eax
call fcn.004e6560
test edi, edi
js 0x4f67b0
call fcn.0054f6e0
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x39c0
mov eax, dword [ebp - 0x400]
mov dword [esp + 0x10], ebx
cmp eax, 0x80
mov dword [esp + 8], eax
sete al
mov dword [esp + 0xc], esi
movzx eax, al
mov dword [esp + 4], str.Got_unexpected_width__lu__size__u__type__s._n
mov dword [esp], eax
call fcn.004e6560
call fcn.0054f6e0
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x39c2
mov eax, dword [ebp - 0x404]
mov dword [esp + 0x10], ebx
cmp eax, 0x80
mov dword [esp + 8], eax
sete al
mov dword [esp + 0xc], esi
movzx eax, al
mov dword [esp + 4], str.Got_unexpected_height__lu__size__u__type__s._n
mov dword [esp], eax
call fcn.004e6560
cmp esi, 0x7b
jbe 0x4f6ec8
mov ecx, dword [0x628750]
xor eax, eax
test ecx, ecx
setne al
xor edi, edi
mov dword [ebp - 0x4ac], eax
call fcn.0054f6e0
mov ecx, dword [eax + 0x10]
mov dword [eax + 0x14], 1
lea edx, [ecx + ecx]
mov ecx, dword [ebp - 0x4ac]
or edx, ecx
mov dword [eax + 0x10], edx
jmp 0x4f6d34
call fcn.0054f6e0
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x39c6
mov eax, dword [ebp - 0x394]
mov dword [esp + 0x10], ebx
cmp eax, edi
mov dword [esp + 8], eax
sete al
mov dword [esp + 0xc], esi
movzx eax, al
mov dword [esp + 4], str.Got_unexpected_texture_stage__lx__size__u__type__s._n
mov dword [esp], eax
call fcn.004e6560
call fcn.0054f6e0
shr dword [eax + 0x10], 1
call fcn.0054f6e0
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x4f6cf0
mov eax, dword [ebp - 0x48c]
mov edx, dword [eax]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + pe_nt_image_headers32]
sub esp, 8
jmp 0x4f67b0
call fcn.0054f6e0
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x39da
mov eax, dword [ebp - 0x400]
mov dword [esp + 0x10], ebx
cmp eax, 0x80
mov dword [esp + 8], eax
sete al
mov dword [esp + 0xc], esi
movzx eax, al
mov dword [esp + 4], str.Got_unexpected_width__lu__size__u__type__s._n
mov dword [esp], eax
call fcn.004e6560
call fcn.0054f6e0
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x39dc
mov eax, dword [ebp - 0x404]
mov dword [esp + 0x10], ebx
cmp eax, 0x80
mov dword [esp + 8], eax
sete al
mov dword [esp + 0xc], esi
movzx eax, al
mov dword [esp + 4], str.Got_unexpected_height__lu__size__u__type__s._n
mov dword [esp], eax
call fcn.004e6560
cmp esi, 0x7b
jbe 0x4f6eb0
mov edx, dword [0x628750]
xor eax, eax
test edx, edx
setne al
xor edi, edi
mov dword [ebp - 0x4ac], eax
call fcn.0054f6e0
mov ecx, dword [eax + 0x10]
mov dword [eax + 0x14], 1
lea edx, [ecx + ecx]
mov ecx, dword [ebp - 0x4ac]
or edx, ecx
mov dword [eax + 0x10], edx
jmp 0x4f6e74
call fcn.0054f6e0
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x39e0
mov eax, dword [ebp - 0x394]
mov dword [esp + 0x10], ebx
cmp eax, edi
mov dword [esp + 8], eax
sete al
mov dword [esp + 0xc], esi
movzx eax, al
mov dword [esp + 4], str.Got_unexpected_texture_stage__lx__size__u__type__s._n
mov dword [esp], eax
call fcn.004e6560
call fcn.0054f6e0
shr dword [eax + 0x10], 1
call fcn.0054f6e0
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x4f6e30
mov eax, dword [ebp - 0x490]
mov edx, dword [eax]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + pe_nt_image_headers32]
sub esp, 8
jmp 0x4f68cd
mov dword [ebp - 0x4ac], 0
mov edi, 0xdeadbeef
jmp 0x4f6e0c
mov dword [ebp - 0x4ac], 0
mov edi, 0xdeadbeef
jmp 0x4f6ccd
mov eax, dword [ebp - 0x494]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
mov eax, dword [ebp - 0x490]
sub esp, 4
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
mov eax, dword [ebp - 0x48c]
sub esp, 4
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
add dword [ebp - 0x4a8], 1
mov eax, dword [ebp - 0x4a8]
cmp eax, 3
jne 0x4f649f
xor esi, esi
lea esi, [esi]
nop
mov eax, 0xcccccccc
mov ecx, 0x100
lea edi, [ebp - 0x40c]
mov ebx, dword [esi*4 + str.lmk6_]
rep stosd dword es:[edi], eax
mov edx, 0x80070057
mov eax, ebx
mov dword [ebp - 0x40c], ebx
and eax, 0xffffffef
cmp eax, 0x6c
cmove edx, ecx
mov ecx, dword [ebp - 0x4a4]
mov eax, dword [ecx]
mov dword [ebp - 0x498], edx
lea edx, [ebp - 0x40c]
mov dword [esp + 4], edx
mov dword [esp], ecx
call dword [eax + 0x30]
sub esp, 8
mov edi, eax
call fcn.0054f6e0
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x3a0d
xor eax, eax
mov dword [esp + 0x10], ebx
mov edx, dword [ebp - 0x498]
mov dword [esp + 8], edi
cmp edx, edi
mov dword [esp + 0xc], edx
sete al
mov dword [esp + 4], str.Got_hr__lx__expected__lx__size__u._n
mov dword [esp], eax
call fcn.004e6560
test edi, edi
js 0x4f7064
call fcn.0054f6e0
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x3a10
mov eax, dword [ebp - 0x40c]
mov dword [esp + 0xc], ebx
cmp eax, 0x7c
mov dword [esp + 8], eax
sete al
mov dword [esp + 4], str.Wrong_size__lu_for__u._n
movzx eax, al
mov dword [esp], eax
call fcn.004e6560
call fcn.0054f6e0
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x3a11
xor eax, eax
mov dword [esp + 8], ebx
mov dword [esp + 4], str.Overflow_for_size__u._n
cmp byte [ebp + ebx - 0x40c], 0xcc
sete al
mov dword [esp], eax
call fcn.004e6560
call fcn.0054f6e0
mov dword [eax], 0x57df88
mov dword [eax + 4], 0x3a12
xor eax, eax
mov dword [esp + 8], ebx
mov dword [esp + 4], str.Struct_not_cleared_for_size__u._n
cmp byte [ebp + ebx - 0x40d], 0xcc
setne al
mov dword [esp], eax
call fcn.004e6560
add esi, 1
cmp esi, 0xf
jne 0x4f6f30
mov ebx, dword [ebp - 0x4a4]
mov eax, dword [ebx]
mov dword [esp], ebx
call dword [eax + 8]
sub esp, 4
mov ebx, eax
mov eax, 0x3a17
call fcn.004e5d30
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.DirectDraw_has__lu_references_left._n
mov dword [esp], eax
call fcn.004e6560
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0x3988
call fcn.004e5d30
mov eax, dword [ebp - 0x4a8]
mov dword [esp], str.Failed_to_create_surface__type__s._n
mov eax, dword [eax*8 + 0x5867d8]
mov dword [esp + 4], eax
call fcn.004e5ff0
jmp 0x4f6f13
mov eax, 0x3978
call fcn.004e5d30
mov dword [esp], str.Failed_to_create_ddraw._n
call fcn.004e5ff0
jmp 0x4f70a8