Function at 0x428690
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x5eae84]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x5fb94c], 0
push ebx
push esi
push edi
mov byte [0x5eb899], 0
jne 0x4287b0
push dword [0x5fb92c]
push dword [0x5eb89c]
call sub.SDL2.dll_SDL_GL_MakeCurrent
mov edi, dword [0x5e187c]
mov esi, dword [0x5e1878]
mov eax, edi
imul eax, esi
shl eax, 2
push eax
call dword [sym.imp.MSVCR110.dll_malloc]
add esp, 0xc
mov ebx, eax
push ebx
push 0x1401
push 0x1908
push edi
push esi
push 0
push 0
call dword [sym.imp.OPENGL32.dll_glReadPixels]
push dword [0x5fb928]
push dword [0x5eb89c]
call sub.SDL2.dll_SDL_GL_MakeCurrent
mov ecx, dword [0x5e1878]
push 0xff000000
push 0xff0000
push 0xff00
push 0xff
lea eax, [ecx*4]
push eax
push 0x20
push dword [0x5e187c]
push ecx
push ebx
call sub.SDL2.dll_SDL_CreateRGBSurfaceFrom
mov esi, eax
add esp, 0x2c
test esi, esi
jne 0x42877c
call sub.SDL2.dll_SDL_GetError
push eax
push str.CreateRGBSurface_failed:__s_n
call dword [sym.imp.MSVCR110.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR110.dll_fprintf]
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057d22e
mov esp, ebp
pop ebp
ret
push esi
push dword [0x5fb944]
call sub.SDL2.dll_SDL_CreateTextureFromSurface
add esp, 8
mov dword [0x5fb94c], eax
test eax, eax
jne 0x4287a1
call sub.SDL2.dll_SDL_GetError
push eax
push str.CreateTextureFromSurface_failed:__s_n
jmp 0x428755
push esi
call sub.SDL2.dll_SDL_FreeSurface
push ebx
call dword [sym.imp.MSVCR110.dll_free]
jmp 0x4287c1
push dword [0x5fb928]
push dword [0x5eb89c]
call sub.SDL2.dll_SDL_GL_MakeCurrent
mov eax, dword [0x5fb948]
add esp, 8
test eax, eax
je 0x4287e0
push eax
call sub.SDL2.dll_SDL_DestroyTexture
add esp, 4
mov dword [0x5fb948], 0
push dword [0x5fb944]
call sub.SDL2.dll_SDL_RenderClear
push 0xff000000
push 0xff0000
push 0xff00
push 0xff
push 0x20
push dword [0x5e187c]
push dword [0x5e1878]
push 0
call sub.SDL2.dll_SDL_CreateRGBSurface
push 0x7f
push 0
push 0
mov ebx, eax
push 0
push dword [ebx + 4]
call sub.SDL2.dll_SDL_MapRGBA
push eax
push 0
push ebx
call sub.SDL2.dll_SDL_FillRect
mov eax, dword [0x5e1878]
cdq
sub eax, edx
sar eax, 1
add esp, 0x44
lea esi, [eax - 0x78]
mov eax, dword [0x5e187c]
cdq
sub eax, edx
sar eax, 1
push str.button_off.png
lea ecx, [eax - 0x6c]
add eax, 0x24
mov dword [0x5fb958], 0xf0
mov dword [0x5fb95c], 0x48
mov dword [0x5fb950], esi
mov dword [0x5fb954], ecx
mov dword [0x5fb968], 0xf0
mov dword [0x5fb96c], 0x48
mov dword [0x5fb960], esi
mov dword [0x5fb964], eax
call sub.SDL2_image.dll_IMG_Load
push str.button_off.png
mov dword [ebp - 0x30], eax
call sub.SDL2_image.dll_IMG_Load
mov ecx, dword [0x5fb958]
mov dword [ebp - 0x2c], eax
mov eax, dword [0x5fb95c]
cdq
sub eax, edx
sar eax, 1
push 0x14
push str.arial.ttf
mov dword [ebp - 0x14], 0
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x28], 0xffffff
call sub.SDL2_ttf.dll_TTF_OpenFont
cmp dword [0x5e197c], 0x10
mov esi, dword [ebp - 0x28]
mov ecx, 0x5e1968
cmovae ecx, dword [0x5e1968]
push esi
mov edi, eax
push ecx
push edi
call sub.SDL2_ttf.dll_TTF_RenderUTF8_Blended
cmp dword [0x5e1994], 0x10
mov ecx, 0x5e1980
cmovae ecx, dword [0x5e1980]
push esi
push ecx
push edi
mov dword [ebp - 0x28], eax
call sub.SDL2_ttf.dll_TTF_RenderUTF8_Blended
mov esi, eax
mov dword [ebp - 0x34], esi
push edi
call sub.SDL2_ttf.dll_TTF_CloseFont
mov edi, dword [ebp - 0x28]
mov eax, dword [edi + 8]
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [0x5fb958]
cdq
sub eax, edx
sar eax, 1
sar ecx, 1
sub eax, ecx
mov dword [ebp - 0x14], eax
mov eax, dword [0x5fb95c]
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [edi + 0xc]
cdq
sub eax, edx
sar eax, 1
sar ecx, 1
sub ecx, eax
mov dword [ebp - 0x10], ecx
mov eax, dword [edi + 8]
mov dword [ebp - 0xc], eax
mov eax, dword [edi + 0xc]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x30]
push 0
push edi
call sub.SDL2.dll_SDL_UpperBlit
mov eax, dword [esi + 8]
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [0x5fb968]
cdq
sub eax, edx
sar eax, 1
sar ecx, 1
sub eax, ecx
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0xc]
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [0x5fb96c]
cdq
sub eax, edx
sar eax, 1
sar ecx, 1
sub eax, ecx
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 8]
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 0xc]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x2c]
push 0
push esi
call sub.SDL2.dll_SDL_UpperBlit
add esp, 0x4c
push str.point.png
call sub.SDL2_image.dll_IMG_Load
mov esi, eax
push 0x5fb950
mov ecx, dword [esi + 8]
push ebx
mov dword [ebp - 0xc], ecx
mov ecx, dword [esi + 0xc]
push 0
push dword [ebp - 0x30]
mov dword [ebp - 8], ecx
call sub.SDL2.dll_SDL_UpperBlit
push 0x5fb960
push ebx
push 0
push dword [ebp - 0x2c]
call sub.SDL2.dll_SDL_UpperBlit
add esp, 0x24
cmp dword [0x5eb8a0], 0
jne 0x428a56
movd xmm0, dword [0x5fb958]
mov eax, dword [0x5fb950]
sub eax, dword [esi + 8]
cvtdq2ps xmm0, xmm0
movd xmm1, eax
divss xmm0, dword [0x58cecc]
cvtdq2ps xmm1, xmm1
addss xmm1, xmm0
cvttss2si eax, xmm1
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0xc]
cdq
and edx, 3
lea ecx, [edx + eax]
mov eax, dword [0x5fb95c]
cdq
sub eax, edx
sar ecx, 2
sar eax, 1
sub eax, ecx
add eax, dword [0x5fb954]
jmp 0x428aa2
movd xmm0, dword [0x5fb968]
mov eax, dword [0x5fb960]
sub eax, dword [esi + 8]
cvtdq2ps xmm0, xmm0
movd xmm1, eax
divss xmm0, dword [0x58cecc]
cvtdq2ps xmm1, xmm1
addss xmm1, xmm0
cvttss2si eax, xmm1
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0xc]
cdq
and edx, 3
lea ecx, [edx + eax]
mov eax, dword [0x5fb96c]
cdq
sub eax, edx
sar ecx, 2
sar eax, 1
sub eax, ecx
add eax, dword [0x5fb964]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
push eax
push ebx
push 0
push esi
call sub.SDL2.dll_SDL_UpperBlit
add esp, 0x10
push ebx
push dword [0x5fb944]
call sub.SDL2.dll_SDL_CreateTextureFromSurface
add esp, 8
mov dword [0x5fb948], eax
test eax, eax
je 0x428794
push esi
call sub.SDL2.dll_SDL_FreeSurface
push edi
call sub.SDL2.dll_SDL_FreeSurface
push dword [ebp - 0x34]
call sub.SDL2.dll_SDL_FreeSurface
push dword [ebp - 0x30]
call sub.SDL2.dll_SDL_FreeSurface
push dword [ebp - 0x2c]
call sub.SDL2.dll_SDL_FreeSurface
push ebx
call sub.SDL2.dll_SDL_FreeSurface
add esp, 0x18
cmp dword [0x5eb8ac], 0
jne 0x428bff
push str.point.png
call sub.SDL2_image.dll_IMG_Load
mov edi, eax
add esp, 4
test edi, edi
jne 0x428b52
push 0x700
push str.FF4_Win32.cpp
push str.DOTEMU_ASSERT_tmp___NULL__failed_at__s__line:__d_n
call dword [sym.imp.MSVCR110.dll_printf]
add esp, 0xc
push 0x10
push str.Assert_Failed
push str.The_program_has_encountered_an_undefined_behavior__see_the_logs_for_more_details
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 1
call dword [sym.imp.MSVCR110.dll_exit]
mov eax, dword [edi + 4]
cmp dword [eax], 0x16362004
je 0x428b77
push 0
push 0x16362004
push edi
call sub.SDL2.dll_SDL_ConvertSurfaceFormat
push edi
mov esi, eax
call sub.SDL2.dll_SDL_FreeSurface
add esp, 0x10
mov edi, esi
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov eax, dword [edi + 8]
mov dword [ebp - 0x1c], eax
mov eax, dword [edi + 0xc]
mov dword [ebp - 0x18], eax
push dword [edi + 0xc]
push dword [edi + 8]
push 0
push 0x16362004
push dword [0x5fb944]
call sub.SDL2.dll_SDL_CreateTexture
add esp, 0x14
mov dword [0x5eb8ac], eax
test eax, eax
jne 0x428bc9
push 0x712
push str.FF4_Win32.cpp
push str.DOTEMU_ASSERT_testImg___NULL__failed_at__s__line:__d_n
jmp 0x428b2d
push dword [edi + 0x10]
lea ecx, [ebp - 0x24]
push dword [edi + 0x14]
push ecx
push eax
call sub.SDL2.dll_SDL_UpdateTexture
push edi
call sub.SDL2.dll_SDL_FreeSurface
add esp, 0x14
cmp dword [0x5eb8ac], 0
jne 0x428bff
push 0x716
push str.FF4_Win32.cpp
push str.DOTEMU_ASSERT_testImg___NULL__failed_at__s__line:__d_n
jmp 0x428b2d
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.0057d22e
mov esp, ebp
pop ebp
ret