Function at 0x405920
Capabilities:
Read file on windows

Disassembly:
push r15
mov eax, 0x1fe8
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.004055c0
sub rsp, rax
mov r14d, ecx
mov r15, rdx
call dbg.__main
mov edx, 0x28
mov ecx, 1
call sym.calloc
mov rbx, rax
movabs rax, 0x100ffffff
mov qword [rbx + 0x18], rax
mov dword [rbx + 0x20], 1
cmp r14d, 2
jle 0x408101
xor ebp, ebp
mov byte [rsp + 0x52], 0
mov r13d, 2
mov byte [rsp + 0x30], 0
mov byte [rsp + 0x53], 0
mov byte [rsp + 0x38], 0
mov byte [rsp + 0x51], 0
mov byte [rsp + 0x50], 0
mov byte [rsp + 0x43], 0
mov dword [rsp + 0x44], ebp
nop dword [rax]
movzx eax, r13b
lea esi, [r13 + 1]
mov rcx, qword [r15 + rax*8]
movzx edi, sil
cmp byte [rcx], 0x2d
jne 0x4059e0
movzx eax, byte [rcx + 1]
sub eax, 0x61
cmp al, 0x15
ja case.0x4059d9.1
lea rcx, [0x0040ac54]
movzx eax, al
movsxd rax, dword [rcx + rax*4]
add rax, rcx
jmp rax
lea rdx, [rsp + 0xfe0]
mov r8d, 0x10
call sub.msvcrt.dll_strtol
mov rcx, rbx
mov edx, eax
mov r12d, eax
call sym.defer_disasm
mov rdx, qword [rsp + 0xfe0]
cmp byte [rdx], 0x3d
je 0x405d38
mov edx, r12d
mov rcx, rbx
call sym.reference
mov r13d, esi
cmp r14d, edi
jg 0x4059a8
mov rcx, qword [r15 + 8]
lea rdx, [0x0040a497]
mov ebp, dword [rsp + 0x44]
call sub.msvcrt.dll_fopen
xor edx, edx
mov r8d, 2
mov r13, rax
mov rcx, rax
call sub.msvcrt.dll_fseek
mov rcx, r13
call sub.msvcrt.dll_ftell
xor r8d, r8d
xor edx, edx
mov rcx, r13
mov dword [rsp + 0x48], eax
call sub.msvcrt.dll_fseek
cmp byte [rsp + 0x38], 0
jne 0x405ffb
mov rax, qword [rbx + 0x10]
mov qword [rsp + 0x38], rax
mov edi, dword [rsp + 0x48]
cmp edi, 0x1000
jg 0x405d9b
movsxd rcx, edi
call sym.malloc
mov ecx, 2
mov r9, r13
mov r12, rax
mov eax, edi
cdq
idiv ecx
mov edx, 2
mov rcx, r12
movsxd rsi, eax
mov r8, rsi
call sub.msvcrt.dll_fread
cmp rsi, rax
je 0x405ad9
mov rdi, qword [r15 + 8]
mov ecx, 2
call qword [dbg.__acrt_iob_func]
lea rdx, str.Failure_while_reading_file__s_n
mov rcx, rax
mov r8, rdi
call sym.fprintf
mov edi, dword [rsp + 0x48]
mov rcx, r13
lea eax, [rdi + rbp]
mov dword [rsp + 0x44], eax
call sub.msvcrt.dll_fclose
sub edi, 1
mov rcx, rsi
jg 0x405fdb
test ebp, ebp
jne 0x4061c0
movzx r13d, word [r12 + 4]
movzx r8d, word [r12 + 6]
shl r13d, 0x10
or r13d, r8d
cmp qword [rbx + 0x10], 0
je 0x407366
cmp byte [rsp + 0x51], 0
je 0x407366
mov r8d, r13d
lea rdx, str.start
mov rcx, rbx
mov r13d, 1
call sym.add_label
lea r15, str.access_fault
lea rdi, [r12 + 0xa]
lea rsi, [r15 + 0x50]
jmp 0x405b65
add r15, 8
add rdi, 4
cmp r15, rsi
je 0x405ba0
movzx r14d, word [rdi - 2]
movzx r8d, word [rdi]
mov rcx, rbx
mov rdx, qword [r15]
shl r14d, 0x10
or r14d, r8d
mov r8d, r14d
call sym.add_label
test r13d, r13d
jne 0x405b58
mov edx, r14d
mov rcx, rbx
add r15, 8
add rdi, 4
call sym.defer_disasm
cmp r15, rsi
jne 0x405b65
mov dword [rsp + 0x470], 0x5f746e69
lea rdi, [r12 + 0x64]
mov esi, 0x31
lea r15, [rsp + 0x470]
mov word [rsp + 0x474], 0x30
jmp 0x405be1
add esi, 1
add rdi, 4
cmp sil, 0x38
je 0x40738b
movzx r14d, word [rdi]
movzx r8d, word [rdi + 2]
mov rdx, r15
mov rcx, rbx
mov byte [rsp + 0x474], sil
shl r14d, 0x10
or r14d, r8d
mov r8d, r14d
call sym.add_label
test r13d, r13d
jne 0x405bd0
mov edx, r14d
mov rcx, rbx
call sym.defer_disasm
jmp 0x405bd0
mov byte [rsp + 0x38], 1
mov r13d, esi
jmp 0x405a1f
cmp r14d, edi
jle 0x4081dc
movzx esi, sil
xor r8d, r8d
xor edx, edx
add r13d, 2
mov rcx, qword [r15 + rsi*8]
movzx edi, r13b
call sub.msvcrt.dll_strtol
mov dword [rsp + 0x44], eax
jmp 0x405a1f
mov byte [rsp + 0x53], 1
mov r13d, esi
jmp 0x405a1f
mov byte [rsp + 0x51], 1
mov r13d, esi
jmp 0x405a1f
mov byte [rsp + 0x52], 1
mov r13d, esi
jmp 0x405a1f
cmp r14d, edi
jle 0x4081ad
movzx esi, sil
lea rdx, [0x0040a473]
lea rsi, [r15 + rsi*8]
mov rcx, qword [rsi]
call sub.msvcrt.dll_fopen
mov r12, rax
test rax, rax
je 0x408183
lea rax, [rsp + 0xfe0]
lea rsi, [rsp + 0x70]
mov qword [rsp + 0x48], rax
jmp 0x405cd7
cmp byte [rsp + 0x70], 0
jne 0x405d50
mov r8, r12
mov edx, 0x400
mov rcx, rsi
call sub.msvcrt.dll_fgets
test rax, rax
jne 0x405cd0
mov rcx, r12
add r13d, 2
call sub.msvcrt.dll_fclose
movzx edi, r13b
jmp 0x405a1f
mov byte [rsp + 0x30], 1
mov r13d, esi
jmp 0x405a1f
mov byte [rsp + 0x50], 1
mov r13d, esi
jmp 0x405a1f
mov byte [rsp + 0x43], 1
mov r13d, esi
jmp 0x405a1f
add rdx, 1
mov r8d, r12d
mov rcx, rbx
call sym.add_label
jmp case.0x4059d9.1
mov rdx, qword [rsp + 0x48]
mov r8d, 0x10
mov rcx, rsi
call sub.msvcrt.dll_strtol
mov dword [rsp + 0x54], eax
test eax, eax
je 0x405cd7
mov edx, eax
mov rcx, rbx
call sym.defer_disasm
mov rax, qword [rsp + 0xfe0]
cmp byte [rax], 0x3d
je 0x407295
mov edx, dword [rsp + 0x54]
mov rcx, rbx
call sym.reference
jmp 0x405cd7
mov eax, dword [rsp + 0x48]
mov esi, 0x9300
cmp eax, 0x9300
cmovle esi, eax
movsxd rdi, esi
mov rcx, rdi
call sym.malloc
mov r9, r13
mov r8, rdi
mov edx, 1
mov rcx, rax
mov r14, rax
call sub.msvcrt.dll_fread
cmp rdi, rax
jne 0x40733b
mov r8d, 0x10
mov rdx, r14
lea rcx, str.SEGADISCSYSTEM
call sym.memcmp
test eax, eax
je 0x405e7a
lea rdx, [r14 + 0x10]
mov r8d, 0x10
lea rcx, str.SEGADISCSYSTEM
call sym.memcmp
test eax, eax
jne 0x405fb2
mov eax, dword [rsp + 0x48]
mov esi, 0x9300
cmp eax, 0x92ff
jg 0x405e2f
mov ecx, 0x930
cdq
idiv ecx
imul esi, eax, 0x930
xor r12d, r12d
mov edi, 0x10
mov eax, edi
mov r8d, 0x800
add edi, 0x930
shr eax, 1
add rax, rax
lea rdx, [r14 + rax]
mov eax, r12d
add r12d, 0x800
shr eax, 1
add rax, rax
lea rcx, [r14 + rax]
call sym.memmove
cmp esi, edi
ja 0x405e37
mov eax, esi
mov ecx, 0x930
xor edx, edx
div ecx
mov esi, eax
shl esi, 0xb
mov rcx, r13
call sub.msvcrt.dll_fclose
mov ecx, esi
mov rax, r14
sar ecx, 1
movsxd rcx, ecx
nop dword [rax]
rol word [rax], 8
add rax, 2
mov rdx, rax
sub rdx, r14
sar rdx, 1
cmp rdx, rcx
jl 0x405e90
cmp byte [rsp + 0x52], 0
jne 0x408057
movzx r13d, word [r14 + 0x40]
movzx eax, word [r14 + 0x42]
movzx edi, word [r14 + 0x44]
shl r13d, 0x10
or r13d, eax
movzx eax, word [r14 + 0x46]
shl edi, 0x10
and r13d, 0xfffff800
or edi, eax
lea eax, [rsi - 0x20]
add edi, r13d
cmp eax, r13d
jb 0x40801d
cmp edi, esi
lea eax, [r13 + 0x18]
mov dword [rsp + 0x44], r13d
mov rbp, qword [rsp + 0x38]
cmova edi, esi
shr eax, 1
xor r15d, r15d
movzx r12d, word [r14 + rax*2]
lea eax, [r13 + 0x1a]
shr eax, 1
movzx eax, word [r14 + rax*2]
shl r12d, 0x10
or r12d, eax
mov eax, 0x6000
sub eax, r13d
add r12d, r13d
mov dword [rsp + 0x30], eax
jmp 0x405f5d
mov eax, r15d
lea rcx, str.init
mov rdx, qword [rcx + rax*8]
add r13d, dword [rsp + 0x30]
mov rcx, rbx
mov r8d, r13d
call sym.add_label
test rbp, rbp
je 0x408047
cmp byte [rsp + 0x51], 0
je 0x408047
add r15d, 1
lea eax, [r12 + r15*2]
cmp edi, eax
jbe 0x406c70
shr eax, 1
movzx eax, word [r14 + rax*2]
test ax, ax
je 0x406c70
lea r13d, [rax + r12]
cmp r13d, esi
jae 0x406c70
cmp r15d, 2
jbe 0x405f27
lea rcx, [rsp + 0xfe0]
lea rdx, str.usercall_u
mov r8d, r15d
mov qword [rsp + 0x38], rcx
call sym.sprintf
mov rcx, qword [rsp + 0x38]
mov rdx, rcx
jmp 0x405f35
cmp dword [rsp + 0x48], 0x8000
jg 0x407405
mov edi, dword [rsp + 0x48]
mov rcx, r13
mov r12, r14
lea eax, [rdi + rbp]
sar edi, 1
mov dword [rsp + 0x44], eax
call sub.msvcrt.dll_fclose
movsxd rcx, edi
mov rax, r12
nop
rol word [rax], 8
add rax, 2
mov rdx, rax
sub rdx, r12
sar rdx, 1
cmp rdx, rcx
jl 0x405fe0
jmp 0x405af8
lea r14, [rsp + 0xfe0]
mov r9, r13
mov r8d, 0x1000
mov edx, 1
mov rcx, r14
call sub.msvcrt.dll_fread
cmp rax, 0x1000
je 0x4074de
movzx eax, word [rsp + 0x52c]
mov edx, dword [rsp + 0x59c]
imul eax, eax, 0x4a
cmp edx, eax
je 0x40747b
mov ebp, dword [rsp + 0x528]
mov eax, dword [rsp + 0x48]
mov rcx, rbx
xor esi, esi
mov edx, dword [rsp + 0x520]
xor edi, edi
lea eax, [rax + rbp - 0x1000]
mov dword [rsp + 0x44], eax
call sym.defer_disasm
mov r8d, dword [rsp + 0x520]
lea rdx, str.main_entry_link
mov rcx, rbx
call sym.add_label
movzx r12d, byte [rsp + 0x53]
cmp word [rsp + 0x52c], 0
je 0x4060e0
mov rax, qword [rsp + 0xfd0]
mov edx, dword [rax + rsi + 0x2c]
test r12b, r12b
je 0x4060aa
cmp dword [rsp + 0x528], edx
je 0x4060b2
mov rcx, rbx
call sym.defer_disasm
mov rax, qword [rsp + 0xfd0]
mov rcx, rbx
add edi, 1
add rax, rsi
add rsi, 0x4c
mov r8d, dword [rax + 0x2c]
lea rdx, [rax + 2]
call sym.add_label
movzx eax, word [rsp + 0x52c]
cmp eax, edi
jg 0x406090
xor r8d, r8d
mov edx, 0x1000
mov rcx, r13
call sub.msvcrt.dll_fseek
mov r14d, dword [rsp + 0x48]
sub r14d, 0x1000
movsxd rcx, r14d
call sym.malloc
mov ecx, 2
mov r9, r13
mov r12, rax
mov eax, r14d
cdq
idiv ecx
mov edx, 2
mov rcx, r12
movsxd rsi, eax
mov r8, rsi
call sub.msvcrt.dll_fread
cmp rsi, rax
je 0x40614e
mov rdi, qword [r15 + 8]
mov ecx, 2
call qword [dbg.__acrt_iob_func]
lea rdx, str.Failure_while_reading_file__s_n
mov rcx, rax
mov r8, rdi
call sym.fprintf
mov rcx, r13
call sub.msvcrt.dll_fclose
sub r14d, 1
mov rax, r12
jle 0x406176
nop
rol word [rax], 8
add rax, 2
mov rdx, rax
sub rdx, r12
sar rdx, 1
cmp rdx, rsi
jl 0x406160
cmp byte [rsp + 0x53], 0
je 0x4061c0
movzx edx, word [r12 + 4]
movzx eax, word [r12 + 6]
mov rcx, rbx
shl edx, 0x10
or edx, eax
call sym.defer_disasm
movzx eax, word [r12 + 4]
movzx r8d, word [r12 + 6]
mov rcx, rbx
lea rdx, str.reset
shl eax, 0x10
or r8d, eax
call sym.add_label
nop word [rax + rax]
cmp byte [rsp + 0x30], 0
je 0x4067e8
cmp byte [rsp + 0x52], 0
je 0x406c93
mov r8d, 0x280
lea rdx, str._bios_reset
mov rcx, rbx
call sym.weak_label
mov r8d, 0x284
lea rdx, str._bios_entry
mov rcx, rbx
call sym.weak_label
mov r8d, 0x288
lea rdx, str._bios_init
mov rcx, rbx
call sym.weak_label
mov r8d, 0x28c
lea rdx, str._bios_init_sp
mov rcx, rbx
call sym.weak_label
mov r8d, 0x290
lea rdx, str._bios_vint
mov rcx, rbx
call sym.weak_label
mov r8d, 0x294
lea rdx, str._bios_set_hint
mov rcx, rbx
call sym.weak_label
mov r8d, 0x298
lea rdx, str._bios_poll_io
mov rcx, rbx
call sym.weak_label
mov r8d, 0x29c
lea rdx, str._bios_detect_io
mov rcx, rbx
call sym.weak_label
mov r8d, 0x2a0
lea rdx, str._bios_clear_vram
mov rcx, rbx
call sym.weak_label
mov r8d, 0x2a4
lea rdx, str._bios_clear_nmtbl
mov rcx, rbx
call sym.weak_label
mov r8d, 0x2a8
lea rdx, str._bios_clear_vsram
mov rcx, rbx
call sym.weak_label
mov r8d, 0x2ac
lea rdx, str._bios_init_vdp
mov rcx, rbx
call sym.weak_label
mov r8d, 0x2b0
lea rdx, str._bios_vdp_loadregs
mov rcx, rbx
call sym.weak_label
mov r8d, 0x2b4
lea rdx, str._bios_vdp_fill
mov rcx, rbx
call sym.weak_label
mov r8d, 0x2b8
lea rdx, str._bios_clear_vram_range
mov rcx, rbx
call sym.weak_label
mov r8d, 0x2bc
lea rdx, str._bios_clear_vram_range_dma
mov rcx, rbx
call sym.weak_label
mov r8d, 0x2c0
lea rdx, str._bios_vram_dma_fill
mov rcx, rbx
call sym.weak_label
mov r8d, 0x2c4
lea rdx, str._bios_update_nmtbl
mov rcx, rbx
call sym.weak_label
mov r8d, 0x2c8
lea rdx, str._bios_update_nmtbl_template
mov rcx, rbx
call sym.weak_label
mov r8d, 0x2cc
lea rdx, str._bios_fill_nmtbl
mov rcx, rbx
call sym.weak_label
mov r8d, 0x2d0
lea rdx, str._bios_vdp_dma
mov rcx, rbx
call sym.weak_label
mov r8d, 0x2d4
lea rdx, str._bios_vdp_dma_wordram
mov rcx, rbx
call sym.weak_label
mov r8d, 0x2d8
lea rdx, str._bios_vdp_display_enable
mov rcx, rbx
call sym.weak_label
mov r8d, 0x2dc
lea rdx, str._bios_vdp_display_disable
mov rcx, rbx
call sym.weak_label
mov r8d, 0x2e0
lea rdx, str._bios_pal_buffer
mov rcx, rbx
call sym.weak_label
mov r8d, 0x2e4
lea rdx, str._bios_pal_buffer_update
mov rcx, rbx
call sym.weak_label
mov r8d, 0x2e8
lea rdx, str._bios_pal_dma
mov rcx, rbx
call sym.weak_label
mov r8d, 0x2ec
lea rdx, str._bios_gfx_decomp
mov rcx, rbx
call sym.weak_label
mov r8d, 0x2f0
lea rdx, str._bios_gfx_decomp_ram
mov rcx, rbx
call sym.weak_label
mov r8d, 0x2f4
lea rdx, str._bios_update_sprites
mov rcx, rbx
call sym.weak_label
mov r8d, 0x2f8
lea rdx, str._bios_clear_ram
mov rcx, rbx
call sym.weak_label
mov r8d, 0x300
lea rdx, str._bios_display_sprite
mov rcx, rbx
call sym.weak_label
mov r8d, 0x304
lea rdx, str._bios_wait_vint
mov rcx, rbx
call sym.weak_label
mov r8d, 0x308
lea rdx, str._bios_wait_vint_flags
mov rcx, rbx
call sym.weak_label
mov r8d, 0x30c
lea rdx, str._bios_dma_sat
mov rcx, rbx
call sym.weak_label
mov r8d, 0x314
lea rdx, str._bios_set_hint_direct
mov rcx, rbx
call sym.weak_label
mov r8d, 0x318
lea rdx, str._bios_disable_hint
mov rcx, rbx
call sym.weak_label
mov r8d, 0x31c
lea rdx, str._bios_print
mov rcx, rbx
call sym.weak_label
mov r8d, 0x320
lea rdx, str._bios_load_user_font
mov rcx, rbx
call sym.weak_label
mov r8d, 0x324
lea rdx, str._bios_load_bios_font
mov rcx, rbx
call sym.weak_label
mov r8d, 0x328
lea rdx, str._bios_load_bios_font_default
mov rcx, rbx
call sym.weak_label
mov r8d, 0x338
lea rdx, str._bios_prng_mod
mov rcx, rbx
call sym.weak_label
mov r8d, 0x33c
lea rdx, str._bios_prng
mov rcx, rbx
call sym.weak_label
mov r8d, 0x340
lea rdx, str._bios_clear_comm
mov rcx, rbx
call sym.weak_label
mov r8d, 0x344
lea rdx, str._bios_comm_update
mov rcx, rbx
call sym.weak_label
mov r8d, 0x364
lea rdx, str._bios_sega_logo
mov rcx, rbx
call sym.weak_label
mov r8d, 0x368
lea rdx, str._bios_set_vint
mov rcx, rbx
call sym.weak_label
mov r8d, 0x200000
lea rdx, str.WORD_RAM
mov rcx, rbx
call sym.weak_label
mov r8d, 0xa12000
lea rdx, str.CD_RESET_IFL2
mov rcx, rbx
call sym.weak_label
mov r8d, 0xa12001
lea rdx, str.CD_RESET_IFL2_BYTE
mov rcx, rbx
call sym.weak_label
mov r8d, 0xa12002
lea rdx, str.CD_WRITE_PROTECT
mov rcx, rbx
call sym.weak_label
mov r8d, 0xa12003
lea rdx, str.CD_MEM_MODE
mov rcx, rbx
call sym.weak_label
mov r8d, 0xa12004
lea rdx, str.CDC_CTRL
mov rcx, rbx
call sym.weak_label
mov r8d, 0xa12006
lea rdx, str.HINT_VECTOR
mov rcx, rbx
call sym.weak_label
mov r8d, 0xa12008
lea rdx, str.CDC_HOST_DATA
mov rcx, rbx
call sym.weak_label
mov r8d, 0xa1200c
lea rdx, str.STOP_WATCH
mov rcx, rbx
call sym.weak_label
mov r8d, 0xa1200e
lea rdx, str.COMM_MAIN_FLAG
mov rcx, rbx
call sym.weak_label
mov r8d, 0xa1200f
lea rdx, str.COMM_SUB_FLAG
mov rcx, rbx
call sym.weak_label
mov r8d, 0xa12010
lea rdx, str.COMM_CMD0
mov rcx, rbx
call sym.weak_label
mov r8d, 0xa12012
lea rdx, str.COMM_CMD1
mov rcx, rbx
call sym.weak_label
mov r8d, 0xa12014
lea rdx, str.COMM_CMD2
mov rcx, rbx
call sym.weak_label
mov r8d, 0xa12016
lea rdx, str.COMM_CMD3
mov rcx, rbx
call sym.weak_label
mov r8d, 0xa12018
lea rdx, str.COMM_CMD4
mov rcx, rbx
call sym.weak_label
mov r8d, 0xa1201a
lea rdx, str.COMM_CMD5
mov rcx, rbx
call sym.weak_label
mov r8d, 0xa1201c
lea rdx, str.COMM_CMD6
mov rcx, rbx
call sym.weak_label
mov r8d, 0xa1201e
lea rdx, str.COMM_CMD7
mov rcx, rbx
call sym.weak_label
mov r8d, 0xa12020
lea rdx, str.COMM_STATUS0
mov rcx, rbx
call sym.weak_label
mov r8d, 0xa12022
lea rdx, str.COMM_STATUS1
mov rcx, rbx
call sym.weak_label
mov r8d, 0xa12024
lea rdx, str.COMM_STATUS2
mov rcx, rbx
call sym.weak_label
mov r8d, 0xa12026
lea rdx, str.COMM_STATUS3
mov rcx, rbx
call sym.weak_label
mov r8d, 0xa12028
lea rdx, str.COMM_STATUS4
mov rcx, rbx
call sym.weak_label
mov r8d, 0xa1202a
lea rdx, str.COMM_STATUS5
mov rcx, rbx
call sym.weak_label
mov r8d, 0xa1202c
lea rdx, str.COMM_STATUS6
mov rcx, rbx
call sym.weak_label
mov r8d, 0xa1202e
lea rdx, str.COMM_STATUS7
mov rcx, rbx
call sym.weak_label
mov eax, dword [rsp + 0x44]
mov dword [rsp + 0x60], ebp
mov qword [rsp + 0x68], r12
mov dword [rsp + 0x64], eax
mov edi, eax
nop dword [rax + rax]
mov r10, qword [rbx + 0x10]
test r10, r10
je 0x406aac
lea rsi, [rsp + 0x470]
jmp 0x40683c
mov rax, qword [r10]
mov rcx, r10
mov qword [rbx + 0x10], rax
call sym.free
mov r10, qword [rbx + 0x10]
test r10, r10
je 0x406aac
mov r12d, dword [r10 + 0x10]
mov rcx, rbx
mov edx, r12d
call sym.is_visited
test al, al
jne 0x406820
mov eax, dword [rbx + 0x18]
and eax, r12d
cmp eax, edi
jae 0x406820
cmp eax, ebp
jb 0x406820
mov rax, qword [r10]
mov rcx, r10
mov qword [rbx + 0x10], rax
call sym.free
mov eax, dword [rbx + 0x18]
mov r8d, r12d
and r8d, eax
cmp r12d, ebp
jb 0x40682f
cmp r8d, edi
ja 0x40682f
lea r15, [rsp + 0x60]
lea r14, [rsp + 0x478]
lea r13, [rsp + 0x484]
jmp 0x4068db
mov edx, eax
and edx, 0xfffffffb
cmp dl, 8
je 0x4069c0
cmp al, 0x11
je 0x4069c0
nop word cs:[rax + rax]
mov eax, dword [rbx + 0x18]
mov r8d, eax
and r8d, r12d
cmp r12d, ebp
jb 0x40682f
cmp r8d, edi
ja 0x40682f
mov r9, qword [rbx + 8]
mov r10d, dword [rbx + 0x20]
test r9, r9
je 0x406a20
mov ecx, r10d
mov eax, 1
shr r8d, cl
mov ecx, r8d
mov edx, r8d
mov r8d, r12d
shr edx, 3
and ecx, 7
shl eax, cl
or byte [r9 + rdx], al
mov rcx, r15
mov rdx, rsi
call sym.m68k_decode.constprop.0
mov r8, r14
mov rdx, rsi
mov rcx, rbx
mov r12d, eax
call sym.check_reference
mov rdx, rsi
mov r8, r13
mov rcx, rbx
call sym.check_reference
movzx eax, byte [rsp + 0x470]
lea edx, [rax - 0x19]
cmp dl, 0x2c
ja 0x4068a0
movabs rcx, 0x100140000001
bt rcx, rdx
jb 0x406800
mov edx, eax
and edx, 0xfffffffb
cmp dl, 8
je 0x4069c0
cmp al, 0x1a
jne 0x406a60
movzx eax, byte [rsp + 0x478]
mov r12d, dword [rsp + 0x47c]
lea edx, [rax - 9]
cmp dl, 1
jbe 0x4069a3
cmp al, 0xb
jne 0x406800
mov edx, dword [rsp + 0x474]
mov eax, dword [rsp + 0x480]
lea r12d, [rdx + rax + 2]
mov edx, r12d
mov rcx, rbx
call sym.is_visited
test al, al
je 0x4068c0
jmp 0x406800
mov edx, dword [rsp + 0x47c]
add edx, dword [rsp + 0x474]
mov rcx, rbx
add edx, 2
mov dword [rsp + 0x30], edx
call sym.reference
mov eax, dword [rsp + 0x470]
mov edx, dword [rsp + 0x30]
and eax, 0xff00ff
cmp eax, 8
je 0x406a00
mov rcx, rbx
call sym.defer_disasm
jmp 0x4068c0
mov rcx, rbx
call sym.is_visited
test al, al
jne 0x406800
mov edx, dword [rsp + 0x30]
mov r12d, edx
jmp 0x4068c0
mov ecx, r10d
add eax, 1
mov dword [rsp + 0x38], r8d
shr eax, cl
mov ecx, 1
mov dword [rsp + 0x30], r10d
shr eax, 3
mov edx, eax
call sym.calloc
mov r8d, dword [rsp + 0x38]
mov r10d, dword [rsp + 0x30]
mov qword [rbx + 8], rax
mov r9, rax
jmp 0x4068ec
cmp al, 0x1b
jne 0x4068c0
movzx eax, byte [rsp + 0x478]
lea edx, [rax - 9]
cmp dl, 1
jbe 0x406aa0
cmp al, 0xb
jne 0x4068c0
mov edx, dword [rsp + 0x474]
mov eax, dword [rsp + 0x480]
mov rcx, rbx
lea edx, [rdx + rax + 2]
call sym.defer_disasm
jmp 0x4068c0
mov edx, dword [rsp + 0x47c]
jmp 0x4069f2
cmp byte [rsp + 0x43], 0
jne 0x406c36
lea rsi, [rsp + 0x470]
lea r13, [rsp + 0x60]
lea rdi, str._s:_n
cmp dword [rsp + 0x44], ebp
jbe 0x406be8
mov qword [rsp + 0x30], r13
mov r12d, dword [rsp + 0x44]
jmp 0x406af4
add ebp, 2
cmp ebp, r12d
jae 0x406be8
mov edx, ebp
mov rcx, rbx
call sym.is_visited
test al, al
je 0x406ae8
mov rcx, qword [rsp + 0x30]
mov r8d, ebp
mov rdx, rsi
lea r14, [rsp + 0x70]
call sym.m68k_decode.constprop.0
cmp byte [rsp + 0x43], 0
je 0x406ba8
mov qword [rsp + 0x20], rbx
lea r9, [sym.format_label]
mov rdx, r14
mov rcx, rsi
mov r8d, 1
call sym.m68k_disasm_ex
mov ecx, dword [rbx + 0x18]
lea r11, [rsp + 0xfe0]
mov rdx, r11
and ecx, ebp
call sym.tern_sortable_int_key
mov rcx, qword [rbx]
mov rdx, r11
call sym.tern_find_ptr
mov r15, rax
test rax, rax
je 0x406b82
mov eax, dword [rax + 8]
test eax, eax
jne 0x406c12
mov edx, dword [r15 + 0x10]
lea rcx, str.ADR__X:_n
call sym.printf
cmp byte [rsp + 0x50], 0
je 0x406bfe
mov r8d, dword [rsp + 0x474]
mov rdx, r14
lea rcx, str._t_s_t__X_n
call sym.printf
jmp 0x406ae8
xor r9d, r9d
xor r8d, r8d
mov rdx, r14
mov rcx, rsi
mov qword [rsp + 0x20], 0
add ebp, 2
call sym.m68k_disasm_ex
mov edx, dword [rsp + 0x474]
mov r8, r14
lea rcx, str._X:__s_n
call sym.printf
cmp ebp, r12d
jb 0x406af4
nop dword [rax]
xor eax, eax
add rsp, 0x1fe8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rdx, r14
lea rcx, str._t_s_n
call sym.printf
jmp 0x406ae8
xor r13d, r13d
nop dword [rax]
mov rax, qword [r15]
mov rcx, rdi
mov rdx, qword [rax + r13*8]
add r13, 1
call sym.printf
cmp dword [r15 + 8], r13d
ja 0x406c18
jmp 0x406b82
mov rcx, qword [rbx]
test rcx, rcx
je 0x406c5f
mov dword [rsp + 0x20], 0
lea r9, [rsp + 0xfe0]
lea r8, [rsp + 0x60]
lea rdx, [sym.print_label_def]
call sym.tern_foreach_int
lea rcx, [0x0040a172]
call sym.puts
jmp 0x406ab7
mov r13d, dword [rsp + 0x44]
mov ebp, 0x6000
sub edi, r13d
mov r12d, r13d
lea eax, [rdi + 0x6000]
shr r12d, 1
mov dword [rsp + 0x44], eax
add r12, r12
add r12, r14
mov rcx, rbx
mov r8d, 0x5e80
lea rdx, str.bios_common_work
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f0a
lea rdx, str._setjmptbl
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f10
lea rdx, str._waitvsync
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f16
lea rdx, str._buram
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f1c
lea rdx, str._cdboot
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f22
lea rdx, str._cdbios
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f28
lea rdx, str._usercall0
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f2e
lea rdx, str._usercall1
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f34
lea rdx, str._usercall2
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f36
lea rdx, str._usercall2Address
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f3a
lea rdx, str._usercall3
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f40
lea rdx, str._adrerr
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f42
lea rdx, str._adrerrAddress
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f46
lea rdx, str._coderr
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f48
lea rdx, str._coderrAddress
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f4c
lea rdx, str._diverr
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f4e
lea rdx, str._diverrAddress
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f52
lea rdx, str._chkerr
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f54
lea rdx, str._chkerrAddress
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f58
lea rdx, str._trperr
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f5a
lea rdx, str._trperrAddress
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f5e
lea rdx, str._spverr
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f60
lea rdx, str._spverrAddress
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f64
lea rdx, str._trace
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f66
lea rdx, str._traceAddress
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f6a
lea rdx, str._nocod0
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f6c
lea rdx, str._nocod0Address
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f70
lea rdx, str._nocod0
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f72
lea rdx, str._nocod0Address
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f76
lea rdx, str._slevel1
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f78
lea rdx, str._slevel1Address
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f7c
lea rdx, str._slevel2
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f7e
lea rdx, str._slevel2Address
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f82
lea rdx, str._slevel3
call sym.weak_label
mov rcx, rbx
mov r8d, 0x5f84
lea rdx, str._slevel3Address
call sym.weak_label
mov rcx, rbx
mov r8d, 0x80000
lea rdx, str.WORD_RAM_2M
call sym.weak_label
mov rcx, rbx
mov r8d, 0xc0000
lea rdx, str.WORD_RAM_1M
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff8000
lea rdx, str.LED_CONTROL
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff8001
lea rdx, str.VERSION_RESET
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff8002
lea rdx, str.MEM_MODE_WORD
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff8003
lea rdx, str.MEM_MODE_BYTE
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff8004
lea rdx, str.CDC_CTRL
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff8005
lea rdx, str.CDC_AR
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff8006
lea rdx, str.CDC_REG_DATA_WORD
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff8007
lea rdx, str.CDC_REG_DATA
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff8008
lea rdx, str.CDC_HOST_DATA
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff800a
lea rdx, str.CDC_DMA_ADDR
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff800c
lea rdx, str.STOP_WATCH
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff800e
lea rdx, str.COMM_MAIN_FLAG
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff800f
lea rdx, str.COMM_SUB_FLAG
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff8010
lea rdx, str.COMM_CMD0
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff8012
lea rdx, str.COMM_CMD1
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff8014
lea rdx, str.COMM_CMD2
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff8016
lea rdx, str.COMM_CMD3
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff8018
lea rdx, str.COMM_CMD4
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff801a
lea rdx, str.COMM_CMD5
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff801c
lea rdx, str.COMM_CMD6
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff801e
lea rdx, str.COMM_CMD7
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff8020
lea rdx, str.COMM_STATUS0
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff8022
lea rdx, str.COMM_STATUS1
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff8024
lea rdx, str.COMM_STATUS2
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff8026
lea rdx, str.COMM_STATUS3
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff8028
lea rdx, str.COMM_STATUS4
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff802a
lea rdx, str.COMM_STATUS5
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff802c
lea rdx, str.COMM_STATUS6
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff802e
lea rdx, str.COMM_STATUS7
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff8030
lea rdx, str.TIMER_WORD
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff8031
lea rdx, str.TIMER
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff8032
lea rdx, str.INT_MASK_WORD
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff8033
lea rdx, str.INT_MASK
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff8034
lea rdx, str.CDD_FADER
call sym.weak_label
mov rcx, rbx
mov r8d, 0xffff8036
lea rdx, str.CDD_CTRL_WORD
call sym.weak_label
mov r8d, 0xffff8037
lea rdx, str.CDD_CTRL_BYTE
mov rcx, rbx
call sym.weak_label
jmp 0x4067e8
lea rbp, [rax + 1]
movzx eax, byte [rax + 1]
mov rdi, r12
test al, al
je 0x4072d4
nop dword [rax]
movsx r12d, al
mov ecx, r12d
call qword [sym.imp.msvcrt.dll_isprint]
test eax, eax
je 0x4072c5
mov ecx, r12d
call dbg.isblank
test eax, eax
je 0x4072d1
movzx eax, byte [rbp + 1]
add rbp, 1
test al, al
jne 0x4072a8
mov r12, rdi
xor eax, eax
mov rdi, rbp
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
mov rax, rcx
not rax
lea rdi, [rbp + rax - 2]
cmp rbp, rdi
jae 0x407326
mov qword [rsp + 0x58], r12
nop dword [rax]
movsx r12d, byte [rdi]
mov ecx, r12d
call qword [sym.imp.msvcrt.dll_isprint]
test eax, eax
je 0x407315
mov ecx, r12d
call dbg.isblank
test eax, eax
je 0x407321
mov byte [rdi], 0
sub rdi, 1
cmp rbp, rdi
jne 0x4072f8
mov r12, qword [rsp + 0x58]
mov r8d, dword [rsp + 0x54]
mov rdx, rbp
mov rcx, rbx
call sym.add_label
jmp 0x405cd7
mov rbx, qword [r15 + 8]
mov ecx, 2
call qword [dbg.__acrt_iob_func]
lea rdx, str.Failure_while_reading_file__s_n
mov rcx, rax
mov r8, rbx
call sym.fprintf
mov eax, 1
jmp 0x406bea
mov r8d, r13d
lea rdx, str.start
mov rcx, rbx
call sym.add_label
mov edx, r13d
mov rcx, rbx
xor r13d, r13d
call sym.defer_disasm
jmp 0x405b41
lea r14, [rsp + 0xfe0]
lea rsi, str.trap_0
mov ecx, 7
mov rdi, r14
rep movsb byte [rdi], byte [rsi]
xor esi, esi
jmp 0x4073be
add rsi, 1
cmp rsi, 0x10
je 0x4061c0
movzx r15d, word [r12 + rsi*4 + 0x64]
cmp rsi, 9
lea edx, [rsi + 0x30]
lea eax, [rsi + 0x57]
movzx r8d, word [r12 + rsi*4 + 0x66]
cmovbe eax, edx
mov rcx, rbx
mov rdx, r14
shl r15d, 0x10
or r15d, r8d
mov byte [rsp + 0xfe5], al
mov r8d, r15d
call sym.add_label
test r13d, r13d
jne 0x4073b0
mov edx, r15d
mov rcx, rbx
call sym.defer_disasm
jmp 0x4073b0
movsxd rdx, dword [rsp + 0x48]
mov rcx, r14
mov rdi, rdx
call sym.realloc
sar edi, 1
xor r8d, r8d
mov edx, 0x8000
mov esi, edi
mov r14, rax
mov rcx, r13
call sub.msvcrt.dll_fseek
sub esi, 0x4000
mov r9, r13
lea rcx, [r14 + 0x8000]
movsxd rsi, esi
mov edx, 2
mov r8, rsi
call sub.msvcrt.dll_fread
cmp rsi, rax
je 0x405fc0
mov rsi, qword [r15 + 8]
mov ecx, 2
call qword [dbg.__acrt_iob_func]
lea rdx, str.Failure_while_reading_file__s_n
mov rcx, rax
mov r8, rsi
call sym.fprintf
jmp 0x405fc0
mov ecx, edx
mov esi, dword [rsp + 0x528]
call sym.malloc
xor r8d, r8d
mov rcx, r13
mov r12, rax
mov eax, dword [rsp + 0x598]
lea edx, [rax + 0x1000]
sub edx, esi
call sub.msvcrt.dll_fseek
mov r9, r13
mov edx, 1
mov rcx, r12
mov r8d, dword [rsp + 0x59c]
call sub.msvcrt.dll_fread
mov r8, rax
mov eax, dword [rsp + 0x59c]
cmp r8, rax
je 0x407e4a
mov rcx, r12
call sym.free
jmp 0x40603f
movzx eax, byte [rsp + 0xfe0]
lea r12, [rsp + 0x60]
lea rdi, [rsp + 0x470]
mov r9d, 0x20
lea r8, [rsp + 0x474]
mov rcx, r12
mov qword [rsp + 0x38], rdi
mov rbp, rdi
shl eax, 8
mov edx, eax
lea rax, [rsp + 0xfe2]
mov qword [rsp + 0x60], rax
movzx eax, byte [rsp + 0xfe1]
or eax, edx
lea rdx, [rsp + 0x472]
mov word [rsp + 0x470], ax
call sym.string_
lea rdx, [rsp + 0x494]
mov r9d, 0x20
mov rcx, r12
lea r8, [rsp + 0x496]
call sym.string_
lea rdx, [rsp + 0x4b6]
mov r9d, 0x20
mov rcx, r12
lea r8, [rsp + 0x4b8]
call sym.string_
lea rdx, [rsp + 0x4d8]
mov r9d, 0x41
mov rcx, r12
lea r8, [rsp + 0x4da]
call sym.string_
mov rdx, qword [rsp + 0x60]
mov r11, rdi
lea rdi, [rsp + 0x4d0]
lea rax, [rdx + 1]
lea rcx, [rdx + 2]
mov r8, rdx
mov qword [rsp + 0x60], rax
movzx eax, byte [rdx]
lea r9, [rdx + 4]
mov qword [rsp + 0x60], rcx
movzx ecx, byte [rdx + 1]
shl eax, 0x18
shl ecx, 0x10
or ecx, eax
lea rax, [rdx + 3]
mov qword [rsp + 0x60], rax
movzx eax, byte [rdx + 2]
mov qword [rsp + 0x60], r9
movzx r9d, byte [rdx + 3]
shl eax, 8
or ecx, r9d
lea r9, [rdx + 8]
or eax, ecx
lea rcx, [rdx + 6]
mov dword [rsp + 0x51c], eax
lea rax, [rdx + 5]
mov qword [rsp + 0x60], rax
movzx eax, byte [rdx + 4]
mov qword [rsp + 0x60], rcx
movzx ecx, byte [rdx + 5]
shl eax, 0x18
shl ecx, 0x10
or ecx, eax
lea rax, [rdx + 7]
add rdx, 0x1c
mov qword [rsp + 0x60], rax
movzx eax, byte [rdx - 0x16]
mov qword [rsp + 0x60], r9
movzx r9d, byte [rdx - 0x15]
shl eax, 8
or ecx, r9d
or eax, ecx
mov dword [rsp + 0x520], eax
mov eax, dword [rdx - 0x14]
bswap eax
mov dword [rsp + 0x524], eax
mov eax, dword [rdx - 0x10]
bswap eax
mov dword [rsp + 0x528], eax
movzx eax, word [rdx - 0xc]
rol ax, 8
mov word [rsp + 0x52c], ax
movzx eax, word [rdx - 0xa]
rol ax, 8
mov word [rsp + 0x52e], ax
movzx eax, word [rdx - 8]
rol ax, 8
mov word [rsp + 0x530], ax
movzx eax, word [rdx - 6]
rol ax, 8
mov word [rsp + 0x532], ax
movzx eax, word [rdx - 4]
rol ax, 8
mov word [rsp + 0x534], ax
movzx eax, byte [rdx - 2]
mov qword [rsp + 0x60], rdx
shl eax, 8
mov ecx, eax
movzx eax, byte [r8 + 0x1b]
or eax, ecx
mov word [rsp + 0x536], ax
lea r10, [rdx + 0x20]
mov r8, r11
mov rax, rdx
lea rcx, [rax + 1]
lea rsi, [rax + 4]
add r8, 8
mov qword [rsp + 0x60], rcx
movzx ecx, byte [rax]
shl ecx, 0x18
mov r9d, ecx
lea rcx, [rax + 2]
mov qword [rsp + 0x60], rcx
movzx ecx, byte [rax + 1]
shl ecx, 0x10
or ecx, r9d
lea r9, [rax + 3]
mov qword [rsp + 0x60], r9
movzx r9d, byte [rax + 2]
mov qword [rsp + 0x60], rsi
movzx esi, byte [rax + 3]
shl r9d, 8
or ecx, esi
or ecx, r9d
mov dword [r8 + 0xc0], ecx
lea rcx, [rax + 5]
mov qword [rsp + 0x60], rcx
lea rcx, [rax + 6]
movzx esi, byte [rax + 4]
mov qword [rsp + 0x60], rcx
movzx ecx, byte [rax + 5]
shl esi, 0x18
shl ecx, 0x10
or esi, ecx
lea rcx, [rax + 7]
add rax, 8
mov qword [rsp + 0x60], rcx
movzx ecx, byte [rax - 2]
mov qword [rsp + 0x60], rax
movzx r9d, byte [rax - 1]
shl ecx, 8
or ecx, esi
or ecx, r9d
mov dword [r8 + 0xc4], ecx
cmp rax, r10
jne 0x4076d4
add r11, 0x20
cmp r11, rdi
je 0x40778e
mov rdx, rax
jmp 0x4076ca
movzx eax, byte [rdx + 0x20]
lea rsi, [rdx + 0x48]
xor r8d, r8d
lea rdi, [rsp + 0x5c0]
lea r9, [rdx + 0x84e]
shl eax, 0x18
mov ecx, eax
movzx eax, byte [rdx + 0x21]
shl eax, 0x10
or eax, ecx
movzx ecx, byte [rdx + 0x23]
or eax, ecx
movzx ecx, byte [rdx + 0x22]
shl ecx, 8
or eax, ecx
mov dword [rsp + 0x598], eax
movzx eax, byte [rdx + 0x24]
shl eax, 0x18
mov ecx, eax
movzx eax, byte [rdx + 0x25]
shl eax, 0x10
or eax, ecx
movzx ecx, byte [rdx + 0x27]
or eax, ecx
movzx ecx, byte [rdx + 0x26]
shl ecx, 8
or eax, ecx
mov ecx, 0x100
mov dword [rsp + 0x59c], eax
mov eax, dword [rdx + 0x28]
bswap eax
mov dword [rsp + 0x5a0], eax
mov eax, dword [rdx + 0x2c]
bswap eax
mov dword [rsp + 0x5a4], eax
mov eax, dword [rdx + 0x30]
bswap eax
mov dword [rsp + 0x5a8], eax
mov eax, dword [rdx + 0x34]
bswap eax
mov dword [rsp + 0x5ac], eax
mov eax, dword [rdx + 0x38]
bswap eax
mov dword [rsp + 0x5b0], eax
mov eax, dword [rdx + 0x3c]
bswap eax
mov dword [rsp + 0x5b4], eax
mov eax, dword [rdx + 0x40]
bswap eax
mov dword [rsp + 0x5b8], eax
mov eax, dword [rdx + 0x44]
bswap eax
mov dword [rsp + 0x5bc], eax
rep movsq qword [rdi], qword [rsi]
mov eax, dword [rdx + 0x848]
bswap eax
mov dword [rsp + 0xdc0], eax
movzx eax, byte [rdx + 0x84c]
mov qword [rsp + 0x60], r9
shl eax, 8
mov ecx, eax
movzx eax, byte [rdx + 0x84d]
mov rdx, r9
lea r9, [rsp + 0xdc8]
or eax, ecx
mov word [rsp + 0xdc4], ax
lea rcx, [rdx + 1]
mov rax, rdx
mov qword [rsp + 0x60], rcx
movzx r10d, byte [rdx]
mov ecx, r10d
lea r10, [rdx + 2]
mov qword [rsp + 0x60], r10
movzx r10d, byte [rdx + 1]
shl ecx, 0x18
shl r10d, 0x10
or r10d, ecx
lea rcx, [rdx + 3]
add rdx, 4
mov qword [rsp + 0x60], rcx
movzx ecx, byte [rdx - 2]
mov qword [rsp + 0x60], rdx
movzx r11d, byte [rax + 3]
shl ecx, 8
or r10d, r11d
or ecx, r10d
mov dword [r9 + r8], ecx
add r8, 4
cmp r8, 0xc
jne 0x407898
lea rdx, [rax + 5]
lea rcx, [rax + 6]
mov r9d, 0x20
mov qword [rsp + 0x60], rdx
movzx edx, byte [rax + 4]
lea r8, [rax + 8]
mov qword [rsp + 0x60], rcx
movzx ecx, byte [rax + 5]
shl edx, 0x18
shl ecx, 0x10
or ecx, edx
lea rdx, [rax + 7]
mov qword [rsp + 0x60], rdx
movzx edx, byte [rax + 6]
mov qword [rsp + 0x60], r8
movzx r8d, byte [rax + 7]
shl edx, 8
or ecx, r8d
lea r8, [rsp + 0xdea]
or edx, ecx
mov dword [rsp + 0xdd4], edx
movzx edx, byte [rax + 8]
mov ecx, edx
movzx edx, byte [rax + 9]
shl ecx, 8
or edx, ecx
mov word [rsp + 0xdd8], dx
movzx edx, byte [rax + 0xa]
mov ecx, edx
movzx edx, byte [rax + 0xb]
shl ecx, 0x18
shl edx, 0x10
or edx, ecx
movzx ecx, byte [rax + 0xd]
or edx, ecx
movzx ecx, byte [rax + 0xc]
shl ecx, 8
or edx, ecx
lea rcx, [rax + 0x16]
mov dword [rsp + 0xddc], edx
mov edx, dword [rax + 0xe]
bswap edx
mov dword [rsp + 0xde0], edx
movzx edx, word [rax + 0x12]
rol dx, 8
mov word [rsp + 0xde4], dx
movzx edx, byte [rax + 0x14]
mov qword [rsp + 0x60], rcx
movzx eax, byte [rax + 0x15]
mov rcx, r12
shl edx, 8
or eax, edx
lea rdx, [rsp + 0xde8]
mov word [rsp + 0xde6], ax
call sym.string_
mov rax, qword [rsp + 0x60]
mov r9d, 0x100
lea rdx, [rax + 1]
lea rcx, [rax + 2]
mov qword [rsp + 0x60], rdx
movzx edx, byte [rax]
lea r8, [rax + 4]
mov qword [rsp + 0x60], rcx
movzx ecx, byte [rax + 1]
shl edx, 0x18
shl ecx, 0x10
or ecx, edx
lea rdx, [rax + 3]
mov qword [rsp + 0x60], rdx
movzx edx, byte [rax + 2]
mov qword [rsp + 0x60], r8
movzx r8d, byte [rax + 3]
shl edx, 8
or ecx, r8d
lea r8, [rax + 8]
or edx, ecx
lea rcx, [rax + 6]
mov dword [rsp + 0xe0c], edx
lea rdx, [rax + 5]
mov qword [rsp + 0x60], rdx
movzx edx, byte [rax + 4]
mov qword [rsp + 0x60], rcx
movzx ecx, byte [rax + 5]
shl edx, 0x18
shl ecx, 0x10
or ecx, edx
lea rdx, [rax + 7]
mov qword [rsp + 0x60], rdx
movzx edx, byte [rax + 6]
mov qword [rsp + 0x60], r8
movzx r8d, byte [rax + 7]
shl edx, 8
or ecx, r8d
lea r8, [rax + 0x10]
or edx, ecx
mov dword [rsp + 0xe10], edx
mov edx, dword [rax + 8]
bswap edx
mov dword [rsp + 0xe14], edx
movzx edx, byte [rax + 0xc]
movzx ecx, byte [rax + 0xd]
shl edx, 0x18
shl ecx, 0x10
or ecx, edx
movzx edx, byte [rax + 0xe]
mov qword [rsp + 0x60], r8
lea r8, [rsp + 0xe1e]
movzx eax, byte [rax + 0xf]
shl edx, 8
or eax, ecx
mov rcx, r12
or eax, edx
lea rdx, [rsp + 0xe1c]
mov dword [rsp + 0xe18], eax
call sym.string_
mov r10, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x38]
lea r8, [rsp + 0xf20]
lea rax, [r10 + 1]
lea r9, [rdi + 0xae8]
nop word [rax + rax]
mov qword [rsp + 0x60], rax
movzx ecx, byte [rax - 1]
lea rdx, [rax + 1]
add r8, 4
mov qword [rsp + 0x60], rdx
lea rdx, [rax + 2]
shl ecx, 0x18
mov r11d, ecx
movzx ecx, byte [rax]
mov qword [rsp + 0x60], rdx
movzx edx, byte [rax + 1]
shl ecx, 0x10
or ecx, r11d
lea r11, [rax + 3]
shl edx, 8
add rax, 4
mov qword [rsp + 0x60], r11
movzx r11d, byte [rax - 2]
or ecx, r11d
or edx, ecx
mov dword [r8 - 4], edx
cmp r8, r9
jne 0x407af0
lea rax, [r10 + 0x39]
mov r9d, 0x20
lea r8, [rsp + 0xf5c]
mov rcx, r12
mov qword [rsp + 0x60], rax
movzx eax, byte [r10 + 0x38]
shl eax, 8
mov edx, eax
lea rax, [r10 + 0x3a]
mov qword [rsp + 0x60], rax
movzx eax, byte [r10 + 0x39]
or eax, edx
lea rdx, [rsp + 0xf5a]
mov word [rsp + 0xf58], ax
call sym.string_
mov rdx, qword [rsp + 0x60]
lea rax, [rdx + 1]
lea rcx, [rdx + 2]
mov r8, rdx
mov qword [rsp + 0x60], rax
movzx eax, byte [rdx]
lea r9, [rdx + 4]
mov qword [rsp + 0x60], rcx
movzx ecx, byte [rdx + 1]
shl eax, 0x18
shl ecx, 0x10
or ecx, eax
lea rax, [rdx + 3]
mov qword [rsp + 0x60], rax
movzx eax, byte [rdx + 2]
mov qword [rsp + 0x60], r9
movzx r9d, byte [rdx + 3]
shl eax, 8
or ecx, r9d
lea r9, [rdx + 8]
or eax, ecx
lea rcx, [rdx + 6]
mov dword [rsp + 0xf7c], eax
lea rax, [rdx + 5]
mov qword [rsp + 0x60], rax
movzx eax, byte [rdx + 4]
mov qword [rsp + 0x60], rcx
movzx ecx, byte [rdx + 5]
shl eax, 0x18
shl ecx, 0x10
or ecx, eax
lea rax, [rdx + 7]
add rdx, 0x10
mov qword [rsp + 0x60], rax
movzx eax, byte [rdx - 0xa]
mov qword [rsp + 0x60], r9
movzx r9d, byte [rdx - 9]
shl eax, 8
or ecx, r9d
lea r9, [rsp + 0xf8c]
or eax, ecx
mov dword [rsp + 0xf80], eax
mov eax, dword [rdx - 8]
bswap eax
mov dword [rsp + 0xf84], eax
movzx eax, byte [rdx - 4]
movzx ecx, byte [rdx - 3]
shl eax, 0x18
shl ecx, 0x10
or ecx, eax
movzx eax, byte [rdx - 2]
mov qword [rsp + 0x60], rdx
movzx r8d, byte [r8 + 0xf]
shl eax, 8
or ecx, r8d
or eax, ecx
xor ecx, ecx
mov dword [rsp + 0xf88], eax
lea rax, [rdx + 1]
mov r10, rdx
mov qword [rsp + 0x60], rax
movzx r8d, byte [rdx]
mov eax, r8d
lea r8, [rdx + 2]
mov qword [rsp + 0x60], r8
movzx r8d, byte [rdx + 1]
shl eax, 0x18
shl r8d, 0x10
or r8d, eax
lea rax, [rdx + 3]
add rdx, 4
mov qword [rsp + 0x60], rax
movzx eax, byte [rdx - 2]
mov qword [rsp + 0x60], rdx
movzx r10d, byte [r10 + 3]
shl eax, 8
or r8d, r10d
or eax, r8d
mov dword [r9 + rcx], eax
add rcx, 4
cmp rcx, 0xc
jne 0x407c74
mov r9, qword [rsp + 0x38]
add r9, 0x18
lea rax, [rdx + 1]
lea r10, [rdx + 4]
mov r8, rdx
add rbp, 8
mov qword [rsp + 0x60], rax
movzx ecx, byte [rdx]
mov eax, ecx
lea rcx, [rdx + 2]
mov qword [rsp + 0x60], rcx
movzx ecx, byte [rdx + 1]
shl eax, 0x18
shl ecx, 0x10
or ecx, eax
lea rax, [rdx + 3]
mov qword [rsp + 0x60], rax
movzx eax, byte [rdx + 2]
mov qword [rsp + 0x60], r10
movzx r10d, byte [rdx + 3]
shl eax, 8
or ecx, r10d
or eax, ecx
mov dword [rbp + 0xb20], eax
lea rax, [rdx + 5]
mov qword [rsp + 0x60], rax
movzx ecx, byte [rdx + 4]
mov eax, ecx
lea rcx, [rdx + 6]
mov qword [rsp + 0x60], rcx
movzx ecx, byte [rdx + 5]
shl eax, 0x18
shl ecx, 0x10
or ecx, eax
lea rax, [rdx + 7]
add rdx, 8
mov qword [rsp + 0x60], rax
movzx eax, byte [rdx - 2]
mov qword [rsp + 0x60], rdx
movzx r10d, byte [r8 + 7]
shl eax, 8
or ecx, r10d
or eax, ecx
mov dword [rbp + 0xb24], eax
cmp rbp, r9
jne 0x407cda
movzx eax, byte [r8 + 8]
shl eax, 0x18
mov edx, eax
movzx eax, byte [r8 + 9]
shl eax, 0x10
or eax, edx
movzx edx, byte [r8 + 0xb]
or eax, edx
movzx edx, byte [r8 + 0xa]
shl edx, 8
or eax, edx
mov dword [rsp + 0xfb0], eax
movzx eax, byte [r8 + 0xc]
shl eax, 0x18
mov edx, eax
movzx eax, byte [r8 + 0xd]
shl eax, 0x10
or eax, edx
movzx edx, byte [r8 + 0xf]
or eax, edx
movzx edx, byte [r8 + 0xe]
shl edx, 8
or eax, edx
mov dword [rsp + 0xfb4], eax
mov eax, dword [r8 + 0x10]
bswap eax
mov dword [rsp + 0xfb8], eax
movzx eax, word [r8 + 0x14]
rol ax, 8
mov word [rsp + 0xfbc], ax
mov eax, dword [r8 + 0x16]
bswap eax
mov dword [rsp + 0xfc0], eax
mov eax, dword [r8 + 0x1a]
bswap eax
mov dword [rsp + 0xfc4], eax
mov eax, dword [r8 + 0x1e]
bswap eax
mov dword [rsp + 0xfc8], eax
mov eax, dword [r8 + 0x22]
mov qword [rsp + 0xfd0], 0
mov qword [rsp + 0xfd8], 0
bswap eax
mov dword [rsp + 0xfcc], eax
jmp 0x406025
movzx ecx, word [rsp + 0x52c]
mov qword [rsp + 0xfe0], r12
xor esi, esi
imul rcx, rcx, 0x4c
call sym.malloc
mov qword [rsp + 0xfd0], rax
movzx eax, word [rsp + 0x52c]
cmp eax, esi
jle 0x40603f
imul rdi, rsi, 0x4c
mov rdx, qword [rsp + 0xfd0]
mov r9d, 0x20
mov rcx, r14
add rdx, rdi
lea r8, [rdx + 2]
call sym.string_
mov rdx, qword [rsp + 0xfe0]
add rdi, qword [rsp + 0xfd0]
mov r9, rdi
lea r10, [rdi + 0x22]
lea r11, [rdx + 0xa]
mov rax, rdx
lea rcx, [rax + 1]
add rax, 2
add r10, 2
mov qword [rsp + 0xfe0], rcx
movzx ecx, byte [rax - 2]
mov qword [rsp + 0xfe0], rax
shl ecx, 8
mov r8d, ecx
movzx ecx, byte [rax - 1]
or ecx, r8d
mov word [r10 - 2], cx
cmp rax, r11
jne 0x407ebc
lea rax, [rdx + 0xb]
lea r8, [rdx + 0xe]
mov qword [rsp + 0xfe0], rax
movzx ecx, byte [rdx + 0xa]
mov eax, ecx
lea rcx, [rdx + 0xc]
mov qword [rsp + 0xfe0], rcx
movzx ecx, byte [rdx + 0xb]
shl eax, 0x18
shl ecx, 0x10
or ecx, eax
lea rax, [rdx + 0xd]
mov qword [rsp + 0xfe0], rax
movzx eax, byte [rdx + 0xc]
mov qword [rsp + 0xfe0], r8
movzx r8d, byte [rdx + 0xd]
shl eax, 8
or ecx, r8d
or eax, ecx
mov dword [r9 + 0x2c], eax
lea rax, [rdx + 0xf]
mov qword [rsp + 0xfe0], rax
movzx eax, byte [rdx + 0xe]
shl eax, 0x18
mov ecx, eax
lea rax, [rdx + 0x10]
mov qword [rsp + 0xfe0], rax
movzx eax, byte [rdx + 0xf]
shl eax, 0x10
or eax, ecx
movzx ecx, byte [rdx + 0x11]
or eax, ecx
movzx ecx, byte [rdx + 0x10]
shl ecx, 8
or eax, ecx
mov dword [r9 + 0x30], eax
mov eax, dword [rdx + 0x12]
bswap eax
mov dword [r9 + 0x34], eax
mov eax, dword [rdx + 0x16]
bswap eax
mov dword [r9 + 0x38], eax
mov eax, dword [rdx + 0x1a]
bswap eax
mov dword [r9 + 0x3c], eax
movzx ecx, byte [rdx + 0x1e]
lea rax, [rdx + 0x22]
add rdx, 0x28
shl ecx, 0x18
mov r8d, ecx
movzx ecx, byte [rdx - 9]
shl ecx, 0x10
or ecx, r8d
movzx r8d, byte [rdx - 7]
or ecx, r8d
movzx r8d, byte [rdx - 8]
shl r8d, 8
or ecx, r8d
mov dword [r9 + 0x40], ecx
lea rcx, [r9 + 0x44]
lea r8, [rax + 1]
add rax, 2
add rcx, 2
mov qword [rsp + 0xfe0], r8
movzx r8d, byte [rax - 2]
mov qword [rsp + 0xfe0], rax
mov r9d, r8d
movzx r8d, byte [rax - 1]
shl r9d, 8
or r8d, r9d
mov word [rcx - 2], r8w
cmp rax, rdx
jne 0x407fda
add rsi, 1
jmp 0x407e6d
mov ecx, 2
call qword [dbg.__acrt_iob_func]
mov r9d, esi
mov r8d, r13d
lea rdx, str.System_Program_start_offset_is__X__but_image_is_only__X_bytes_n
mov rcx, rax
call sym.fprintf
mov eax, 1
jmp 0x406bea
mov edx, r13d
mov rcx, rbx
call sym.defer_disasm
jmp 0x405f59
mov r8d, 0xff0000
lea rdx, str.start
mov rcx, rbx
movzx r13d, word [r14 + 0x30]
movzx ebp, word [r14 + 0x32]
movzx edi, word [r14 + 0x34]
lea r12, [r14 + 0x200]
movzx r15d, word [r14 + 0x36]
call sym.add_label
cmp qword [rsp + 0x38], 0
je 0x408171
cmp byte [rsp + 0x51], 0
je 0x408171
movzx eax, word [r14 + 0x20a]
cmp ax, 0x57a
je 0x408166
cmp ax, 0x564
mov r8d, 0xff056e
mov eax, 0xff0156
cmovne r8d, eax
lea rdx, str.user_start
mov rcx, rbx
movzx r14d, bp
call sym.add_label
mov eax, edi
mov edx, r13d
mov ebp, 0xff0000
shl eax, 0x10
shl edx, 0x10
or eax, r15d
or edx, r14d
add eax, edx
cmp eax, esi
cmova eax, esi
add eax, 0xfefe00
mov dword [rsp + 0x44], eax
jmp 0x4061d6
mov rcx, qword [r15 + 8]
lea rdx, [0x0040a497]
xor ebp, ebp
call sub.msvcrt.dll_fopen
mov r8d, 2
xor edx, edx
mov r13, rax
mov rcx, rax
call sub.msvcrt.dll_fseek
mov rcx, r13
call sub.msvcrt.dll_ftell
xor r8d, r8d
xor edx, edx
mov rcx, r13
mov dword [rsp + 0x48], eax
call sub.msvcrt.dll_fseek
mov rax, qword [rbx + 0x10]
mov byte [rsp + 0x52], 0
mov byte [rsp + 0x30], 0
mov qword [rsp + 0x38], rax
mov byte [rsp + 0x43], 0
mov byte [rsp + 0x50], 0
mov byte [rsp + 0x51], 0
jmp 0x405a78
mov r8d, 0xff0584
jmp 0x4080c3
mov edx, 0xff0000
mov rcx, rbx
call sym.defer_disasm
jmp 0x40809e
mov rbx, qword [rsi]
mov ecx, 2
call qword [dbg.__acrt_iob_func]
lea rdx, str.Failed_to_open__s_for_reading_n
mov rcx, rax
mov r8, rbx
call sym.fprintf
mov ecx, 1
call sym.exit
mov ecx, 2
call qword [dbg.__acrt_iob_func]
mov r8d, 0x22
mov edx, 1
lea rcx, str._f_must_be_followed_by_a_filename_n
mov r9, rax
call sym.fwrite
mov ecx, 1
call sym.exit
mov ecx, 2
call qword [dbg.__acrt_iob_func]
mov r8d, 0x21
mov edx, 1
lea rcx, str._s_must_be_followed_by_an_offset_n
mov r9, rax
call sym.fwrite
mov ecx, 1
call sym.exit
nop
nop
nop
nop
nop