Function at 0x401460
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0xd0
call sym.___main
mov dword [esp], 0
call sym._time
mov dword [esp], eax
call sym._srand
mov dword [0x408080], 1
mov dword [esp + 4], sym._atexit
mov dword [esp], 0x5020201
call sym._al_install_system
xor eax, 1
test al, al
je 0x4014dc
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x21
mov dword [esp + 4], 1
mov dword [esp], str.Allegro_initialization_is_failed.
call sym._fwrite
mov eax, 0xffffffff
jmp 0x401e13
call sym._al_init_primitives_addon
xor eax, 1
test al, al
je 0x40151a
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x32
mov dword [esp + 4], 1
mov dword [esp], str.Aleggro_primitives_addon_initialization_is_failed.
call sym._fwrite
mov eax, 0xffffffff
jmp 0x401e13
call sym._al_init_image_addon
xor eax, 1
test al, al
je 0x401558
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x2d
mov dword [esp + 4], 1
mov dword [esp], str.Allegro_image_addon_initialization_is_failed.
call sym._fwrite
mov eax, 0xffffffff
jmp 0x401e13
mov dword [esp + 0xc4], 0
mov dword [esp + 0xc0], 0
mov dword [esp + 0xbc], 0
mov dword [esp + 0xb8], 0
mov dword [esp + 0xb4], 0
lea eax, [esp + 0x98]
mov dword [esp], eax
call sym._init_square
lea eax, [esp + 0x80]
mov dword [esp], eax
call sym._init_food
mov dword [esp + 4], 0x1e0
mov dword [esp], 0x280
call sub.allegro_5.2.dll_al_create_display
mov dword [esp + 0xc4], eax
cmp dword [esp + 0xc4], 0
jne 0x401604
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x25
mov dword [esp + 4], 1
mov dword [esp], str.Display_creation_procceses_is_failed.
call sym._fwrite
mov eax, 0xffffffff
jmp 0x401e13
call sym._al_create_event_queue
mov dword [esp + 0xc0], eax
cmp dword [esp + 0xc0], 0
jne 0x40165b
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1d
mov dword [esp + 4], 1
mov dword [esp], str.Failed_to_create_event_queue_n
call sym._fwrite
mov eax, dword [esp + 0xc4]
mov dword [esp], eax
call sym._al_destroy_display
mov eax, 0xffffffff
jmp 0x401e13
fld qword [0x4061d0]
fstp qword [esp]
call sym._al_create_timer
mov dword [esp + 0xbc], eax
cmp dword [esp + 0xbc], 0
jne 0x4016ca
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x17
mov dword [esp + 4], 1
mov dword [esp], str.Failed_to_create_timer_n
call sym._fwrite
mov eax, dword [esp + 0xc4]
mov dword [esp], eax
call sym._al_destroy_display
mov eax, dword [esp + 0xc0]
mov dword [esp], eax
call sym._al_destroy_event_queue
mov eax, 0xffffffff
jmp 0x401e13
fld qword [0x4061d8]
fstp qword [esp]
call sym._al_create_timer
mov dword [esp + 0xb8], eax
cmp dword [esp + 0xb8], 0
jne 0x401748
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1c
mov dword [esp + 4], 1
mov dword [esp], str.Failed_to_create_tick_timer_n
call sym._fwrite
mov eax, dword [esp + 0xc4]
mov dword [esp], eax
call sym._al_destroy_display
mov eax, dword [esp + 0xc0]
mov dword [esp], eax
call sym._al_destroy_event_queue
mov eax, dword [esp + 0xbc]
mov dword [esp], eax
call sym._al_destroy_timer
mov eax, 0xffffffff
jmp 0x401e13
mov dword [esp], str.images_background.jpg
call sym._al_load_bitmap
mov dword [esp + 0xb4], eax
cmp dword [esp + 0xb4], 0
jne 0x4017d3
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x20
mov dword [esp + 4], 1
mov dword [esp], str.Failed_to_load_background_image_n
call sym._fwrite
mov eax, dword [esp + 0xc4]
mov dword [esp], eax
call sym._al_destroy_display
mov eax, dword [esp + 0xc0]
mov dword [esp], eax
call sym._al_destroy_event_queue
mov eax, dword [esp + 0xbc]
mov dword [esp], eax
call sym._al_destroy_timer
mov eax, dword [esp + 0xb8]
mov dword [esp], eax
call sym._al_destroy_timer
mov eax, 0xffffffff
jmp 0x401e13
call sym._al_install_keyboard
mov eax, dword [esp + 0xc4]
mov dword [esp], eax
call sym._al_get_display_event_source
mov dword [esp + 4], eax
mov eax, dword [esp + 0xc0]
mov dword [esp], eax
call sym._al_register_event_source
mov eax, dword [esp + 0xbc]
mov dword [esp], eax
call sym._al_get_timer_event_source
mov dword [esp + 4], eax
mov eax, dword [esp + 0xc0]
mov dword [esp], eax
call sym._al_register_event_source
mov eax, dword [esp + 0xb8]
mov dword [esp], eax
call sym._al_get_timer_event_source
mov dword [esp + 4], eax
mov eax, dword [esp + 0xc0]
mov dword [esp], eax
call sym._al_register_event_source
call sym._al_get_keyboard_event_source
mov dword [esp + 4], eax
mov eax, dword [esp + 0xc0]
mov dword [esp], eax
call sym._al_register_event_source
mov dword [esp + 0xc], 0
fldz
fstp dword [esp + 8]
fldz
fstp dword [esp + 4]
mov eax, dword [esp + 0xb4]
mov dword [esp], eax
call sym._al_draw_bitmap
call sym._al_flip_display
mov eax, dword [esp + 0xbc]
mov dword [esp], eax
call sym._al_start_timer
mov eax, dword [esp + 0xb8]
mov dword [esp], eax
call sym._al_start_timer
mov byte [esp + 0xcf], 1
jmp 0x401dba
lea eax, [esp + 0x40]
mov dword [esp + 4], eax
mov eax, dword [esp + 0xc0]
mov dword [esp], eax
call sym._al_wait_for_event
mov eax, dword [esp + 0x40]
cmp eax, 0x1e
jne 0x401bca
mov eax, dword [esp + 0x44]
cmp eax, dword [esp + 0xb8]
jne 0x401973
lea eax, [esp + 0x20]
mov edx, dword [esp + 0x98]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x9c]
mov dword [esp + 8], edx
mov edx, dword [esp + 0xa0]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0xa4]
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0xa8]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0xac]
mov dword [esp + 0x18], edx
mov dword [esp], eax
call sym._update_player_position
mov eax, dword [esp + 0x20]
mov dword [esp + 0x98], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x9c], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0xa0], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0xa4], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0xa8], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0xac], eax
jmp 0x401dba
mov eax, dword [esp + 0x44]
cmp eax, dword [esp + 0xbc]
jne 0x401dba
mov eax, dword [esp + 0x98]
fld qword [eax]
fld qword [esp + 0x88]
fucom st(1)
fnstsw ax
sahf
jp 0x401b07
fucompp
fnstsw ax
sahf
jne 0x401b11
mov eax, dword [esp + 0x98]
fld qword [eax + 8]
fld qword [esp + 0x90]
fucom st(1)
fnstsw ax
sahf
jp 0x401b0d
fucompp
fnstsw ax
sahf
jne 0x401b11
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0xb
mov dword [esp + 4], 1
mov dword [esp], str.Food_eaten_n
call sym._fwrite
mov eax, dword [0x408080]
add eax, 1
mov dword [0x408080], eax
lea eax, [esp + 0x20]
mov edx, dword [esp + 0x98]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x9c]
mov dword [esp + 8], edx
mov edx, dword [esp + 0xa0]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0xa4]
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0xa8]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0xac]
mov dword [esp + 0x18], edx
mov dword [esp], eax
call sym._add_new_node
mov eax, dword [esp + 0x20]
mov dword [esp + 0x98], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x9c], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0xa0], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0xa4], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0xa8], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0xac], eax
lea eax, [esp + 0x20]
mov dword [esp], eax
call sym._init_food
mov eax, dword [esp + 0x20]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x88], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x90], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x94], eax
mov eax, dword [0x408080]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Score:__d_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp], eax
call sym._fprintf
jmp 0x401b11
fstp st(0)
fstp st(0)
jmp 0x401b11
fstp st(0)
fstp st(0)
mov dword [esp + 0xc], 0
fldz
fstp dword [esp + 8]
fldz
fstp dword [esp + 4]
mov eax, dword [esp + 0xb4]
mov dword [esp], eax
call sym._al_draw_bitmap
mov eax, dword [esp + 0x98]
mov dword [esp], eax
mov eax, dword [esp + 0x9c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0xa0]
mov dword [esp + 8], eax
mov eax, dword [esp + 0xa4]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0xa8]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0xac]
mov dword [esp + 0x14], eax
call sym._draw_player
mov eax, dword [esp + 0x80]
mov dword [esp], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x88]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x8c]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x90]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x94]
mov dword [esp + 0x14], eax
call sym._draw_food
call sym._al_flip_display
jmp 0x401dba
mov eax, dword [esp + 0x40]
cmp eax, 0x2a
jne 0x401be0
mov byte [esp + 0xcf], 0
jmp 0x401dba
mov eax, dword [esp + 0x40]
cmp eax, 0xa
jne 0x401dba
mov eax, dword [esp + 0x54]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Key_pressed:__d_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp], eax
call sym._fprintf
mov eax, dword [esp + 0x54]
cmp eax, 0x3b
jne 0x401c23
mov byte [esp + 0xcf], 0
jmp 0x401dba
mov eax, dword [esp + 0x54]
cmp eax, 0x54
jne 0x401c54
mov eax, dword [esp + 0xa0]
cmp eax, 1
je 0x401c54
mov dword [esp + 4], 0
lea eax, [esp + 0x98]
mov dword [esp], eax
call sym._change_direction
jmp 0x401dba
mov eax, dword [esp + 0x54]
cmp eax, 0x55
jne 0x401c84
mov eax, dword [esp + 0xa0]
test eax, eax
je 0x401c84
mov dword [esp + 4], 1
lea eax, [esp + 0x98]
mov dword [esp], eax
call sym._change_direction
jmp 0x401dba
mov eax, dword [esp + 0x54]
cmp eax, 0x52
jne 0x401cb5
mov eax, dword [esp + 0xa0]
cmp eax, 3
je 0x401cb5
mov dword [esp + 4], 2
lea eax, [esp + 0x98]
mov dword [esp], eax
call sym._change_direction
jmp 0x401dba
mov eax, dword [esp + 0x54]
cmp eax, 0x53
jne 0x401ce6
mov eax, dword [esp + 0xa0]
cmp eax, 2
je 0x401ce6
mov dword [esp + 4], 3
lea eax, [esp + 0x98]
mov dword [esp], eax
call sym._change_direction
jmp 0x401dba
mov eax, dword [esp + 0x54]
cmp eax, 0x43
jne 0x401d7c
mov eax, dword [0x408080]
mov dword [esp + 0xc8], eax
jmp 0x401d62
mov eax, dword [esp + 0x98]
mov edx, dword [esp + 0xc8]
add edx, 0xfffffff
shl edx, 4
add eax, edx
fld qword [eax + 8]
mov eax, dword [esp + 0x98]
mov edx, dword [esp + 0xc8]
add edx, 0xfffffff
shl edx, 4
add eax, edx
fld qword [eax]
fxch st(1)
fstp qword [esp + 0x10]
fstp qword [esp + 8]
mov dword [esp + 4], str._f__f_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp], eax
call sym._fprintf
sub dword [esp + 0xc8], 1
cmp dword [esp + 0xc8], 0
jg 0x401d01
fld qword [0x4061e0]
fstp qword [esp]
call sym._al_rest
jmp 0x401dba
mov eax, dword [esp + 0x54]
cmp eax, 0x1c
jne 0x401dba
mov eax, dword [esp + 0x98]
fld qword [eax + 8]
mov eax, dword [esp + 0x98]
fld qword [eax]
fxch st(1)
fstp qword [esp + 0x10]
fstp qword [esp + 8]
mov dword [esp + 4], str._f__f_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp], eax
call sym._fprintf
cmp byte [esp + 0xcf], 0
jne 0x4018a9
mov eax, dword [esp + 0xc0]
mov dword [esp], eax
call sym._al_destroy_event_queue
mov eax, dword [esp + 0xc4]
mov dword [esp], eax
call sym._al_destroy_display
mov eax, dword [esp + 0xbc]
mov dword [esp], eax
call sym._al_destroy_timer
mov eax, dword [esp + 0xb8]
mov dword [esp], eax
call sym._al_destroy_timer
call sym._al_shutdown_image_addon
call sym._al_shutdown_primitives_addon
mov eax, 0
leave
ret