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

Disassembly:
sub esp, 0x58
push ebx
push ebp
push esi
mov esi, dword [esp + 0x74]
mov eax, esi
and eax, 0xff000000
push edi
xor edi, edi
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x70]
xor ebp, ebp
cmp eax, edi
mov dword [esp + 0x40], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x38], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x54], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x10], edi
mov dword [esp + 0x3c], edi
je 0x30010eae
cmp dword [esp + 0x74], edi
je 0x30010eae
mov ebx, dword [esp + 0x6c]
and esi, 0x1f
cmp esi, 2
mov dword [esp + 0x1c], esi
jne 0x3001051f
mov esi, dword [esp + 0x78]
shr esi, 0x17
and esi, 1
push esi
push ebx
call fcn.3000f590
add esp, 8
test eax, eax
je 0x3001050a
mov dword [esp + 0x24], 1
jmp 0x30010560
push ebx
mov eax, esi
mov dword [esp + 0x30], 1
call fcn.3000f360
add esp, 4
jmp 0x30010560
mov eax, dword [esp + 0x78]
shr eax, 0x17
and eax, 1
push ebx
mov dword [esp + 0x30], 1
call fcn.3000f360
mov eax, dword [0x30068c8c]
add esp, 4
cmp eax, edi
je 0x30010558
cmp esi, edi
jne 0x30010551
mov eax, 1
jmp 0x300106ed
mov eax, esi
jmp 0x300106ed
cmp esi, edi
jne 0x30010e98
cmp dword [esp + 0x24], edi
jne 0x30010596
cmp dword [0x30068c8c], edi
je 0x30010576
cmp dword [0x30068ca0], edi
jne 0x30010596
mov eax, dword [esp + 0x78]
shr eax, 0x17
and eax, 1
push eax
push ebx
call fcn.3000f590
add esp, 8
test eax, eax
je 0x30010596
mov dword [esp + 0x24], 1
cmp dword [0x30068ca0], 2
jl 0x300106da
push ebx
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
push edi
mov dword [esp + 0x1c], edi
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push edi
mov esi, eax
push ebx
mov dword [esp + 0x58], esi
call dword [sym.imp.USER32.dll_ReleaseDC]
test esi, esi
je 0x300106da
mov eax, dword [0x30058080]
xor edi, edi
cmp eax, edi
je 0x300105f7
push 0x468
call eax
mov ebx, eax
cmp ebx, edi
je 0x300105f7
cmp ebx, 0xffffffff
jne 0x300105f3
mov dword [esp + 0x38], edi
jmp 0x300106da
mov cl, 3
jmp 0x3001061b
push 0x468
call fcn.30006997
add esp, 4
cmp eax, edi
mov dword [esp + 0x30], eax
jne 0x30010615
mov dword [esp + 0x38], edi
jmp 0x300106da
mov ebx, dword [esp + 0x30]
xor cl, cl
mov dl, bl
and dl, 0x1f
mov al, 0x40
sub al, dl
movzx edx, al
add ebx, edx
cmp cl, 3
mov dword [esp + 0x30], ebx
mov byte [ebx - 1], al
mov byte [ebx - 2], cl
jne 0x30010640
mov eax, dword [0x30058084]
mov dword [ebx - 8], eax
xor eax, eax
mov edi, ebx
mov ecx, 0x10a
rep stosd dword es:[edi], eax
mov ecx, dword [0x30068ca0]
mov eax, ecx
imul eax, dword [esp + 0x70]
xor edx, edx
add eax, 0x1f
and eax, 0xffffffe0
div ecx
mov edx, dword [esp + 0x74]
neg edx
mov dword [ebx + 8], edx
xor edx, edx
cmp ecx, 3
sete dl
mov dword [ebx], 0x28
mov word [ebx + 0xc], 1
mov dword [esp + 0x38], ebx
add ebx, 0x28
push ebx
dec edx
and edx, 3
mov dword [ebx - 0x18], edx
mov dword [ebx - 0x24], eax
lea eax, [ecx*8]
mov word [ebx - 0x1a], ax
mov ebx, dword [esp + 0x1c]
call fcn.30010310
mov edi, dword [esp + 0x34]
add esp, 4
push 0
push 0
mov ebp, eax
lea eax, [esp + 0x54]
push eax
push 0
push edi
push esi
call dword [sym.imp.GDI32.dll_CreateDIBSection]
test eax, eax
mov dword [esp + 0x48], eax
jne 0x30010c6a
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
push edi
call sym.binkw32.dll__radfree_4
mov eax, dword [esp + 0x1c]
xor esi, esi
cmp eax, esi
jne 0x30010bdb
mov eax, 3
mov dword [esp + 0x18], eax
dec eax
mov dword [esp + 0x30], eax
jmp 0x30010700
mov eax, dword [esp + 0x30]
cmp eax, 9
ja case.0x3001070f.1
mov ecx, eax
jmp dword [ecx*4 + 0x30010ebc]
mov eax, dword [esp + 0x14]
mov edx, dword [0x30068cb0]
and edx, eax
cmp edx, eax
jne case.0x3001070f.1
mov esi, dword [esp + 0x74]
mov ebx, dword [esp + 0x70]
push 0xf
push 0x32315659
call fcn.30010160
add esp, 8
test eax, eax
mov dword [esp + 0x10], eax
je case.0x3001070f.1
push eax
mov dword [esp + 0x38], 1
call sym.binkw32.dll__BinkDDSurfaceType_4
mov ecx, dword [esp + 0x18]
mov edx, dword [0x30068cb0]
mov ebp, eax
or ebp, 0x4000000
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
jmp case.0x3001070f.1
mov eax, dword [esp + 0x14]
mov ecx, dword [0x30068cb0]
and ecx, eax
cmp ecx, eax
jne case.0x3001070f.1
mov esi, dword [esp + 0x74]
mov ebx, dword [esp + 0x70]
push 0xd
push 0x32595559
call fcn.30010160
add esp, 8
test eax, eax
mov dword [esp + 0x10], eax
je case.0x3001070f.1
mov edx, eax
push edx
mov dword [esp + 0x38], 1
call sym.binkw32.dll__BinkDDSurfaceType_4
mov ecx, dword [0x30068cb0]
mov ebp, eax
or ebp, 0x4000000
jmp 0x30010abb
mov eax, dword [esp + 0x14]
mov edx, dword [0x30068cb0]
and edx, eax
cmp edx, eax
jne case.0x3001070f.1
mov esi, dword [esp + 0x74]
mov ebx, dword [esp + 0x70]
push 0xe
push 0x59565955
call fcn.30010160
add esp, 8
test eax, eax
mov dword [esp + 0x10], eax
je case.0x3001070f.1
push eax
mov dword [esp + 0x38], 1
call sym.binkw32.dll__BinkDDSurfaceType_4
mov ecx, dword [esp + 0x18]
mov edx, dword [0x30068cb0]
mov ebp, eax
or ebp, 0x4000000
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
jmp case.0x3001070f.1
mov eax, dword [esp + 0x14]
test eax, eax
jne case.0x3001070f.1
call fcn.30010400
test eax, eax
je case.0x3001070f.1
mov eax, dword [0x30068c90]
push eax
call sym.binkw32.dll__BinkDDSurfaceType_4
mov ebp, eax
test ebp, ebp
je case.0x3001070f.1
cmp ebp, 0xffffffff
jne 0x30010883
mov ecx, 6
mov esi, str.Video_mode_not_supported.
mov edi, 0x30055cc0
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
jmp case.0x3001070f.1
mov edx, dword [esp + 0x6c]
mov esi, dword [0x30068c90]
mov ecx, dword [esp + 0x18]
push 0xfffffffffffffff4
push edx
or ebp, 0x4000000
mov dword [esp + 0x18], esi
mov dword [esp + 0x24], ecx
mov dword [esp + 0x4c], 1
call dword [sym.imp.USER32.dll_GetClassLongA]
push eax
push esi
call sym.binkw32.dll__BinkIsSoftwareCursor_8
mov dword [esp + 0x40], eax
jmp case.0x3001070f.1
mov eax, dword [esp + 0x14]
mov ecx, dword [0x30068cb4]
and ecx, eax
cmp ecx, eax
jne case.0x3001070f.1
mov esi, dword [esp + 0x74]
mov ebx, dword [esp + 0x70]
push 0xf
mov edx, 0x32315659
call fcn.30010230
add esp, 4
test eax, eax
mov dword [esp + 0x10], eax
je case.0x3001070f.1
mov edx, eax
push edx
call sym.binkw32.dll__BinkDDSurfaceType_4
mov ecx, dword [esp + 0x18]
mov edx, dword [0x30068cb4]
mov ebp, eax
mov eax, dword [esp + 0x14]
neg eax
sbb eax, eax
and eax, 0x8000000
or ebp, eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x28], 1
jmp case.0x3001070f.1
mov eax, dword [esp + 0x14]
mov ecx, dword [0x30068cb4]
and ecx, eax
cmp ecx, eax
jne case.0x3001070f.1
mov esi, dword [esp + 0x74]
mov ebx, dword [esp + 0x70]
push 0xd
mov edx, 0x32595559
call fcn.30010230
add esp, 4
test eax, eax
mov dword [esp + 0x10], eax
je case.0x3001070f.1
mov edx, eax
push edx
call sym.binkw32.dll__BinkDDSurfaceType_4
mov ecx, dword [esp + 0x18]
mov edx, dword [0x30068cb4]
mov ebp, eax
mov eax, dword [esp + 0x14]
neg eax
sbb eax, eax
and eax, 0x8000000
or ebp, eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x28], 1
jmp case.0x3001070f.1
mov eax, dword [esp + 0x14]
mov ecx, dword [0x30068cb4]
and ecx, eax
cmp ecx, eax
jne case.0x3001070f.1
mov esi, dword [esp + 0x74]
mov ebx, dword [esp + 0x70]
push 0xe
mov edx, 0x59565955
call fcn.30010230
add esp, 4
test eax, eax
mov dword [esp + 0x10], eax
je case.0x3001070f.1
mov edx, eax
push edx
call sym.binkw32.dll__BinkDDSurfaceType_4
mov ecx, dword [esp + 0x18]
mov edx, dword [0x30068cb4]
mov ebp, eax
mov eax, dword [esp + 0x14]
neg eax
sbb eax, eax
and eax, 0x8000000
or ebp, eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x28], 1
jmp case.0x3001070f.1
mov eax, dword [esp + 0x14]
mov ecx, dword [0x30068cb4]
and ecx, eax
cmp ecx, eax
jne case.0x3001070f.1
mov esi, dword [esp + 0x74]
mov ebx, dword [esp + 0x70]
push 0
xor edx, edx
call fcn.30010230
mov esi, eax
mov dword [esp + 0x14], esi
jmp 0x30010a64
mov eax, dword [esp + 0x14]
mov edx, dword [0x30068cb4]
and edx, eax
cmp edx, eax
jne case.0x3001070f.1
mov esi, dword [esp + 0x74]
mov ebx, dword [esp + 0x70]
push 0
mov edx, 1
call fcn.30010230
mov dword [esp + 0x14], eax
mov esi, eax
add esp, 4
test esi, esi
je case.0x3001070f.1
push esi
call sym.binkw32.dll__BinkDDSurfaceType_4
mov ebp, eax
xor edi, edi
cmp ebp, edi
jne 0x30010a85
mov eax, dword [esi]
push esi
call dword [eax + 8]
mov dword [esp + 0x10], edi
jmp case.0x3001070f.1
cmp ebp, 0xffffffff
jne 0x30010a9d
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [esp + 0x10], edi
jmp 0x3001086b
mov edx, dword [esp + 0x14]
mov ecx, dword [0x30068cb4]
neg edx
sbb edx, edx
and edx, 0x8000000
or ebp, edx
mov dword [esp + 0x28], 1
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x30010b03
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x30]
inc esi
inc eax
cmp eax, 1
mov dword [esp + 0x18], esi
mov dword [esp + 0x30], eax
mov byte [0x30055cc0], 0
je 0x30010af8
cmp eax, 9
jle 0x30010700
jmp 0x30010b18
mov ebx, dword [esp + 0x6c]
xor edi, edi
jmp 0x30010560
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x30010bbe
mov al, byte [0x30055cc0]
test al, al
jne 0x30010b3f
mov eax, dword [0x30068ca4]
test eax, eax
je 0x30010b2b
cmp eax, 8
mov ecx, str.256_color_mode_not_supported.
jle 0x30010b30
mov ecx, str.No_capable_blitting_style_available.
mov edx, 0x30055cc0
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x30010b35
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x30010b79
dec dword [0x30068c88]
jne 0x30010b79
mov eax, dword [0x30068c90]
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [0x30068c8c]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [0x30068c8c], 0
mov dword [0x30068c90], 0
mov eax, dword [esp + 0x24]
test eax, eax
je 0x30010eae
dec dword [0x30068cbc]
jne 0x30010eae
mov eax, dword [0x30068cb8]
test eax, eax
je 0x30010eae
push 4
push 0
mov dword [0x30068cb8], 0
call dword [sym.imp.USER32.dll_ChangeDisplaySettingsA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x58
ret 0x10
mov eax, dword [0x30068c8c]
mov edx, dword [eax]
push 0
lea ecx, [esp + 0x40]
push ecx
push 0
push eax
call dword [edx + 0x10]
mov ebx, dword [esp + 0x70]
jmp 0x30010ca5
cmp dword [0x30068ca0], 2
mov ecx, str.256_color_mode_not_supported.
jl 0x30010bee
mov ecx, str.Unable_to_create_DIBSection.
mov edx, 0x30055cc0
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x30010bf3
cmp dword [esp + 0x2c], esi
je 0x30010c2d
dec dword [0x30068c88]
jne 0x30010c2d
mov eax, dword [0x30068c90]
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [0x30068c8c]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [0x30068c8c], esi
mov dword [0x30068c90], esi
cmp dword [esp + 0x24], esi
je 0x30010eae
dec dword [0x30068cbc]
jne 0x30010eae
cmp dword [0x30068cb8], esi
je 0x30010eae
push 4
push esi
mov dword [0x30068cb8], esi
call dword [sym.imp.USER32.dll_ChangeDisplaySettingsA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x58
ret 0x10
push eax
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
mov ebx, dword [edi + 4]
imul ebx, dword [0x30068ca0]
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x14]
add ebx, 3
and ebx, 0xfffffffc
neg eax
sbb eax, eax
and eax, 0x8000000
mov dword [esp + 0x1c], 2
or ebp, eax
mov dword [esp + 0x20], 0xff000000
mov eax, dword [0x30058080]
test eax, eax
je 0x30010cc9
push 0xe8
call eax
test eax, eax
je 0x30010cc9
cmp eax, 0xffffffff
jne 0x30010cc2
xor esi, esi
jmp 0x30010d0b
mov byte [esp + 0x78], 3
jmp 0x30010ce3
push 0xe8
call fcn.30006997
add esp, 4
test eax, eax
jne 0x30010cde
xor esi, esi
jmp 0x30010d0b
mov byte [esp + 0x78], 0
mov dl, al
and dl, 0x1f
mov cl, 0x40
sub cl, dl
movzx edx, cl
add eax, edx
mov byte [eax - 1], cl
mov cl, byte [esp + 0x78]
cmp cl, 3
mov byte [eax - 2], cl
jne 0x30010d09
mov ecx, dword [0x30058084]
mov dword [eax - 8], ecx
mov esi, eax
mov edx, dword [esp + 0x70]
xor eax, eax
mov ecx, 0x2a
mov edi, esi
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x20]
mov edi, dword [esp + 0x6c]
mov dword [esi], edx
mov edx, dword [esp + 0x10]
mov dword [esi + 4], eax
mov dword [esi + 0x38], ecx
mov ecx, dword [esp + 0x40]
mov dword [esi + 0x48], edx
mov edx, dword [esp + 0x34]
mov dword [esi + 0x10], ebp
mov eax, dword [esp + 0x3c]
mov dword [esi + 0x4c], eax
mov eax, dword [esp + 0x28]
mov dword [esi + 0x74], ecx
mov ecx, dword [esp + 0x1c]
mov dword [esi + 0x68], edx
mov edx, dword [esp + 0x44]
mov dword [esi + 0x6c], eax
mov eax, dword [0x30055cb4]
mov dword [esi + 0x80], ecx
mov ecx, dword [0x30055cb0]
mov dword [esi + 0x84], edx
mov edx, dword [0x30068ca4]
mov dword [esi + 0x24], eax
mov eax, dword [esp + 0x48]
mov dword [esi + 0x28], ecx
mov dword [esi + 0x2c], edx
mov edx, dword [esp + 0x38]
mov dword [esi + 0x90], eax
mov eax, dword [esp + 0x50]
mov dword [esi + 0x60], edi
mov dword [esi + 0x98], ebx
mov ecx, dword [esp + 0x4c]
mov dword [esi + 0x94], ecx
mov ecx, dword [esp + 0x54]
mov dword [esi + 0xa4], ecx
lea ecx, [esp + 0x58]
mov dword [esi + 0x9c], edx
mov edx, dword [esp + 0x2c]
mov dword [esi + 0xa0], eax
mov eax, dword [esp + 0x24]
push ecx
push edi
mov dword [esi + 0x88], edx
mov dword [esi + 0x8c], eax
call dword [sym.imp.USER32.dll_GetWindowRect]
mov ebp, dword [esp + 0x58]
mov edx, dword [esp + 0x60]
sub edx, ebp
mov dword [esi + 8], edx
mov ebx, dword [esp + 0x5c]
mov eax, dword [esp + 0x64]
sub eax, ebx
mov dword [esi + 0xc], eax
mov ecx, dword [esp + 0x58]
mov dword [esi + 0x1c], ecx
mov edx, dword [esp + 0x5c]
lea eax, [esp + 0x58]
push eax
mov dword [esi + 0x20], edx
xor ebx, ebx
push edi
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
call dword [sym.imp.USER32.dll_ClientToScreen]
mov ecx, dword [esp + 0x58]
mov eax, dword [esi + 0x1c]
mov ebp, dword [esi + 0x20]
sub ecx, eax
mov dword [esi + 0x1c], ecx
mov edx, dword [esp + 0x5c]
sub edx, ebp
lea eax, [esp + 0x58]
mov dword [esi + 0x20], edx
push eax
push edi
call dword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [esp + 0x60]
mov ecx, dword [esi + 8]
mov edx, dword [esi + 0xc]
sub ecx, eax
mov eax, dword [esi]
mov dword [esi + 0x30], ecx
mov ebp, dword [esp + 0x64]
add eax, ecx
sub edx, ebp
push ebx
mov dword [esi + 8], eax
mov eax, dword [esi + 4]
mov ecx, edx
push ebx
add ecx, eax
push esi
mov dword [esi + 0x34], edx
mov dword [esi + 0xc], ecx
call sym.binkw32.dll__BinkBufferSetOffset_12
mov edx, dword [esi + 4]
mov eax, dword [esi]
push edx
push eax
push esi
call sym.binkw32.dll__BinkBufferSetScale_12
mov eax, dword [esi + 0x4c]
cmp eax, ebx
je 0x30010e8c
mov ecx, dword [eax]
push edi
push ebx
push eax
call dword [ecx + 0x20]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret 0x10
mov ecx, 7
mov esi, str.DirectDraw_is_not_available
mov edi, 0x30055cc0
rep movsd dword es:[edi], dword [esi]
call fcn.3000f560
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x58
ret 0x10