Function at 0x4af210
Capabilities:
Terminate process

Disassembly:
sub esp, 0x490
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi]
mov byte [esi + 0x50], 0
call dword [eax + 0x74]
mov ecx, dword [esp + 0x4ac]
mov edi, dword [esp + 0x4a4]
cmp ecx, eax
jne 0x4af27b
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0xb4]
cmp dword [edi], eax
jne 0x4af27b
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x9c]
mov ecx, dword [esp + 0x4a8]
cmp dword [ecx], eax
jne 0x4af27b
mov eax, dword [0x5e1974]
test eax, eax
je 0x4af27b
mov eax, dword [0x5e1978]
test eax, eax
je 0x4af27b
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x490
ret 0x10
call fcn.004ae9c0
mov al, byte [0x536558]
test al, al
jne 0x4af313
call fcn.00465aa0
mov ecx, dword [esp + 0x4b0]
mov dword [esp + 0x4ac], eax
cmp ecx, 8
je 0x4af2e9
cmp ecx, 0x10
je 0x4af2ce
cmp ecx, 0x18
jne 0x4af313
cmp eax, ecx
je 0x4af313
cmp eax, 0x20
je 0x4af313
mov edx, str.You_are_trying_run_in_24_bit_windowed_mode.__You_must_set_your_screen_24_bit__millions_of_colors__before_running_this_application.
mov ecx, str.BAD_SCREEN_MODE
call fcn.00465a30
push 0xffffffffffffffff
call fcn.005009bb
cmp eax, 0x10
je 0x4af313
mov edx, str.You_are_trynig_to_run_in_16_bit.__Y_must_set_your_screen_to_16_bit__65536_colors__before_running_this_application.
mov ecx, str.BAD_SCREEN_MODE
call fcn.00465a30
push 0xffffffffffffffff
call fcn.005009bb
mov cl, byte [0x536558]
test cl, cl
jne 0x4af313
cmp eax, 0x18
je 0x4af2fd
cmp eax, 0x20
jne 0x4af313
mov edx, str.You_are_tring_to_run_it_8_bit_mode.__You_must_set_your_screen_to_256__8_bit___32768__15_bit___or_65536__16_bit__color_mode_before_running_this_application_in_a_window.
mov ecx, str.BAD_SCREEN_MODE
call fcn.00465a30
push 0xffffffffffffffff
call fcn.005009bb
mov eax, dword [0x5e1974]
test eax, eax
jne 0x4af335
push eax
push 0x5e1974
push eax
call sub.DDRAW.dll_DirectDrawCreate
test eax, eax
jne 0x4af8c1
mov eax, dword [0x5e1974]
mov cl, byte [0x536558]
mov edx, dword [eax]
test cl, cl
je 0x4af345
push 0x51
jmp 0x4af347
push 8
mov ecx, dword [0x5e3f70]
push ecx
push eax
call dword [edx + 0x50]
mov ebp, eax
mov dword [esi + 0x4c], 0
mov eax, dword [0x5e1974]
lea ecx, [esp + 0x4ac]
push 0x4af050
push ecx
mov edx, dword [eax]
mov ebx, 2
push 0
push ebx
push eax
call dword [edx + 0x20]
test eax, eax
je 0x4af39b
mov eax, dword [0x5e1974]
lea ecx, [esp + 0x4ac]
push 0x4af050
push ecx
mov edx, dword [eax]
push 0
push 0
push eax
call dword [edx + 0x20]
mov edx, dword [esi + 0x4c]
push 0x4af8f0
push 0xc
lea eax, [esi + 0x54]
push edx
push eax
call fcn.00500d48
add esp, 0x10
call fcn.004af180
mov ecx, dword [esp + 0x4a8]
push ecx
push edi
mov ecx, esi
call fcn.004aefc0
mov eax, dword [edi]
test eax, eax
je 0x4af8c1
mov edx, dword [esp + 0x4a8]
mov edx, dword [edx]
test edx, edx
je 0x4af8c1
test ebp, ebp
jne 0x4af8c1
mov cl, byte [0x536558]
test cl, cl
je 0x4af414
mov ebp, dword [esp + 0x4ac]
mov ecx, dword [0x5e1974]
push ebp
push edx
mov edi, dword [ecx]
push eax
push ecx
call dword [edi + 0x54]
mov ebp, eax
test ebp, ebp
jne 0x4af8c1
mov ecx, 0x1b
xor eax, eax
lea edi, [esp + 0x14]
rep stosd dword es:[edi], eax
mov al, byte [0x536558]
mov dword [esp + 0x14], 0x6c
test al, al
je 0x4af4d9
mov dword [esi + 0x44], ebx
mov eax, dword [0x5e1974]
push 0
lea edx, [esp + 0x18]
mov dword [esp + 0x1c], 0x21
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x80], 0x4218
mov ecx, dword [eax]
push 0x5e1988
push edx
push eax
call dword [ecx + 0x18]
mov ebp, eax
test ebp, ebp
jne 0x4af476
mov byte [esi + 0x50], 1
jmp 0x4af512
mov eax, 1
push 0
mov dword [esi + 0x44], eax
mov dword [esp + 0x2c], eax
mov eax, dword [0x5e1974]
lea edx, [esp + 0x18]
push 0x5e1988
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x18]
mov ebp, eax
test ebp, ebp
jne 0x4af4a5
mov byte [esi + 0x50], 1
jmp 0x4af512
mov eax, dword [esp + 0x7c]
push 0
and ah, 0xbf
lea edx, [esp + 0x18]
mov dword [esp + 0x80], eax
mov eax, dword [0x5e1974]
push 0x5e1988
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x18]
mov ebp, eax
test ebp, ebp
jne 0x4af8c1
mov byte [esi + 0x50], al
jmp 0x4af512
mov dword [esi + 0x44], 0
mov eax, dword [0x5e1974]
push 0
lea edx, [esp + 0x18]
mov dword [esp + 0x1c], 1
mov dword [esp + 0x80], 0x200
mov ecx, dword [eax]
push 0x5e1988
push edx
push eax
call dword [ecx + 0x18]
test eax, eax
jne 0x4af8c1
mov al, byte [0x536558]
test al, al
je 0x4af54c
mov eax, dword [0x5e1988]
lea edx, [esp + 0x10]
mov dword [esp + 0x10], 4
push 0x5e1978
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x30]
test eax, eax
jne 0x4af8c1
mov byte [0x5e18c4], 1
jmp 0x4af606
mov edx, dword [esp + 0x4a8]
mov ecx, 0x1b
xor eax, eax
lea edi, [esp + 0x14]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x4a4]
push 0
mov dword [esp + 0x18], 0x6c
mov dword [esp + 0x1c], 7
mov ecx, dword [eax]
mov eax, dword [edx]
mov dword [esp + 0x20], eax
mov eax, dword [0x5e1974]
lea edx, [esp + 0x18]
mov dword [esp + 0x80], 0x40
mov dword [esp + 0x24], ecx
mov ecx, dword [eax]
push 0x5e1978
push edx
push eax
call dword [ecx + 0x18]
test eax, eax
jne 0x4af8c1
mov eax, dword [0x5e1974]
push 0
mov byte [0x5e18c4], 1
push 0x5e1980
mov ecx, dword [eax]
push 0
push eax
call dword [ecx + 0x10]
test eax, eax
jne 0x4af8c1
mov eax, dword [0x5e1980]
mov ecx, dword [0x5e3f70]
push ecx
push 0
mov edx, dword [eax]
push eax
call dword [edx + 0x20]
test eax, eax
jne 0x4af8c1
test ebp, ebp
jne 0x4af8c1
mov eax, dword [0x5e1988]
mov ecx, dword [0x5e1980]
push ecx
push eax
mov edx, dword [eax]
call dword [edx + 0x70]
xor eax, eax
lea ecx, [esp + 0xa1]
mov byte [ecx - 1], al
mov byte [ecx], al
mov byte [ecx + 1], al
mov byte [ecx + 2], 1
inc eax
add ecx, 4
cmp eax, 0x100
jl 0x4af60f
mov eax, dword [0x5e1974]
push 0
lea ecx, [esp + 0xa4]
push 0x5e1984
mov edx, dword [eax]
push ecx
push 4
push eax
call dword [edx + 0x14]
test eax, eax
je 0x4af650
mov dword [0x5e1984], 0
mov eax, dword [0x5e1988]
mov ecx, dword [0x5e1984]
push ecx
push eax
mov edx, dword [eax]
call dword [edx + 0x7c]
mov eax, dword [0x5e1978]
mov ecx, dword [0x5e1984]
push ecx
push eax
mov edx, dword [eax]
call dword [edx + 0x7c]
mov ecx, 0x1b
xor eax, eax
lea edi, [esp + 0x14]
push 0
rep stosd dword es:[edi], eax
mov eax, dword [0x5e1978]
lea ecx, [esp + 0x18]
push 1
mov dword [esp + 0x1c], 0x6c
mov edx, dword [eax]
push ecx
push 0
push eax
call dword [edx + 0x64]
mov eax, dword [0x5e1978]
push 0
push eax
mov edx, dword [eax]
call dword [edx + 0x80]
mov ebx, dword [esp + 0x4a4]
mov ebp, dword [esp + 0x4a8]
mov edx, dword [esp + 0x4ac]
mov eax, dword [ebx]
push edx
mov word [esi + 0x12], ax
mov ecx, dword [ebp]
mov word [esi + 0x14], cx
mov ecx, esi
call fcn.00458b50
mov eax, dword [esp + 0x4ac]
cmp eax, 8
jne 0x4af6f0
mov eax, dword [esp + 0x24]
push 1
jmp 0x4af80b
cmp eax, 0x10
jne 0x4af79c
mov ecx, dword [esi + 0x4c]
xor edi, edi
test ecx, ecx
jbe 0x4af71b
mov edx, dword [ebx]
lea eax, [esi + 0x58]
cmp edx, dword [eax - 4]
jne 0x4af713
mov ebx, dword [ebp]
cmp ebx, dword [eax]
je 0x4af71b
inc edi
add eax, 0xc
cmp edi, ecx
jb 0x4af707
push 0x10
mov ecx, esi
call fcn.00458b50
lea ecx, [edi + edi*2]
mov byte [esi + 0xcc], 1
cmp dword [esi + ecx*4 + 0x5c], 0xf
jne 0x4af73c
mov byte [esi + 0xcc], 0
push 0
push str.Use_Legacy_Color_Mode
mov edx, 0x5cefb0
mov ecx, 0x5ceeb0
call fcn.00452400
test eax, eax
setne bl
mov byte [esp + 0x10], bl
mov edx, dword [esp + 0x10]
and edx, 0xff
mov ecx, 0x5ceeb0
push edx
push str.Use_Legacy_Color_Mode
mov edx, 0x5cefb0
call fcn.00452420
test bl, bl
je 0x4af78f
mov al, byte [esi + 0xcc]
test al, al
sete al
mov byte [esi + 0xcc], al
mov eax, dword [esp + 0x24]
push 1
cdq
sub eax, edx
sar eax, 1
jmp 0x4af80b
cmp eax, 0x18
jne 0x4af7da
mov edx, dword [esi + 0x4c]
xor ecx, ecx
test edx, edx
jbe 0x4af7c3
mov edi, dword [ebx]
lea eax, [esi + 0x58]
cmp edi, dword [eax - 4]
jne 0x4af7bb
mov ebx, dword [ebp]
cmp ebx, dword [eax]
je 0x4af7c3
inc ecx
add eax, 0xc
cmp ecx, edx
jb 0x4af7af
mov ecx, dword [esp + 0x24]
mov eax, 0x55555556
imul ecx
mov ecx, edx
push 1
shr ecx, 0x1f
add edx, ecx
push edx
jmp 0x4af80c
mov edx, dword [esi + 0x4c]
xor ecx, ecx
test edx, edx
jbe 0x4af7fc
mov edi, dword [ebx]
lea eax, [esi + 0x58]
cmp edi, dword [eax - 4]
jne 0x4af7f4
mov ebx, dword [ebp]
cmp ebx, dword [eax]
je 0x4af7fc
inc ecx
add eax, 0xc
cmp ecx, edx
jb 0x4af7e8
mov eax, dword [esp + 0x24]
push 1
cdq
and edx, 3
add eax, edx
sar eax, 2
push eax
mov ecx, esi
call fcn.00458bd0
mov edx, dword [esi]
push 1
mov ecx, esi
call dword [edx + 0xe8]
mov ecx, eax
call fcn.0048b270
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax + 0xe8]
push eax
mov ecx, esi
call fcn.004afb60
mov eax, dword [esi + 0x44]
xor edi, edi
add eax, 2
test eax, eax
mov dword [esi + 0x40], eax
jbe 0x4af8b2
mov edx, dword [esi]
lea eax, [esp + 0x80]
push eax
mov ecx, esi
call dword [edx + 0x90]
mov eax, dword [0x545e40]
test eax, eax
je 0x4af894
push 0xff
push 1
push 0
push 0
lea ecx, [esp + 0xa0]
call fcn.0048d940
mov edx, dword [esi]
lea eax, [esp + 0x90]
lea ecx, [esp + 0x80]
push eax
push ecx
mov ecx, esi
call dword [edx + 0x70]
jmp 0x4af8a3
mov edx, dword [esi]
lea eax, [esp + 0x80]
push eax
mov ecx, esi
call dword [edx + 0x60]
mov ecx, esi
call fcn.004b0710
mov eax, dword [esi + 0x40]
inc edi
cmp edi, eax
jb 0x4af849
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x490
ret 0x10
call fcn.004ae9c0
mov ecx, dword [esp + 0x4a4]
mov edx, dword [esp + 0x4a8]
pop edi
pop esi
mov dword [ecx], 0
pop ebp
mov dword [edx], 0
xor al, al
pop ebx
add esp, 0x490
ret 0x10