Function at 0x405360
Capabilities:
Enumerate pe sections
Read file on windows
Write file on windows

Disassembly:
push ebp
mov eax, 0x1fc0
mov ebp, esp
push edi
push esi
push ebx
and esp, 0xfffffff0
call fcn.00405110
sub esp, eax
call dbg.__main
mov dword [esp + 4], 0x18
mov dword [esp], 1
call sym._calloc
cmp dword [ebp + 8], 2
mov dword [eax + 0xc], 0xffffff
mov ebx, eax
mov dword [eax + 0x10], 1
mov dword [eax + 0x14], 1
jle 0x407762
mov byte [esp + 0x2d], 0
mov eax, 2
mov byte [esp + 0x24], 0
mov dword [esp + 0x38], 0
mov byte [esp + 0x30], 0
mov byte [esp + 0x28], 0
mov byte [esp + 0x18], 0
mov byte [esp + 0x2e], 0
mov byte [esp + 0x2f], 0
mov dword [esp + 0x3c], ebx
mov ebx, eax
lea esi, [esi]
mov esi, dword [ebp + 0xc]
movzx eax, bl
mov eax, dword [esi + eax*4]
lea esi, [ebx + 1]
mov ecx, esi
cmp byte [eax], 0x2d
movzx edi, cl
jne 0x405418
movzx eax, byte [eax + 1]
sub eax, 0x61
cmp al, 0x15
ja case.0x40540c.1
movzx eax, al
jmp dword [eax*4 + 0x409c44]
lea edx, [esp + 0xfc0]
mov dword [esp + 8], 0x10
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_strtol
mov edx, eax
mov ebx, eax
mov eax, dword [esp + 0x3c]
call sym._defer_disasm
mov edx, dword [esp + 0xfc0]
cmp byte [edx], 0x3d
je 0x4057a0
mov eax, dword [esp + 0x3c]
mov edx, ebx
call sym._reference
mov ebx, esi
cmp edi, dword [ebp + 8]
jl 0x4053e8
mov eax, dword [ebp + 0xc]
mov ebx, dword [esp + 0x3c]
mov dword [esp + 4], 0x40948b
mov eax, dword [eax + 4]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov esi, eax
mov dword [esp], eax
mov dword [esp + 0x20], eax
call sub.msvcrt.dll_fseek
mov dword [esp], esi
call sub.msvcrt.dll_ftell
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], esi
mov dword [esp + 0x1c], eax
call sub.msvcrt.dll_fseek
cmp byte [esp + 0x28], 0
jne 0x405a8e
mov eax, dword [ebx + 8]
mov dword [esp + 0x3c], eax
mov esi, dword [esp + 0x1c]
cmp esi, 0x1000
jg 0x405810
mov dword [esp], esi
call sym._malloc
mov ecx, 2
mov dword [esp + 4], 2
mov edi, eax
mov dword [esp + 0x34], eax
mov eax, esi
cdq
mov dword [esp], edi
idiv ecx
mov esi, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 8], esi
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fread
cmp esi, eax
je 0x405541
mov eax, dword [ebp + 0xc]
mov edi, dword [eax + 4]
mov dword [esp], 2
call dword [0x40801c]
mov dword [esp + 4], str.Failure_while_reading_file__s_n
mov dword [esp + 8], edi
mov dword [esp], eax
call sym._fprintf
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x38]
add eax, edi
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
sub edi, 1
jg 0x405a6d
cmp dword [esp + 0x38], 0
jne 0x405c78
mov esi, dword [esp + 0x34]
movzx eax, word [esi + 4]
shl eax, 0x10
mov edx, eax
movzx eax, word [esi + 6]
mov esi, edx
or esi, eax
cmp dword [ebx + 8], 0
je 0x406ba6
cmp byte [esp + 0x18], 0
je 0x406ba6
mov ecx, esi
mov edx, str.start
mov eax, ebx
call sym._add_label
mov dword [esp + 0x30], 1
mov edi, dword [esp + 0x34]
xor esi, esi
jmp 0x4055c8
add esi, 1
cmp esi, 0xa
je 0x405606
movzx ecx, word [edi + esi*4 + 8]
movzx eax, word [edi + esi*4 + 0xa]
mov edx, dword [esi*4 + 0x409d60]
shl ecx, 0x10
or ecx, eax
mov eax, ebx
mov dword [esp + 0x28], ecx
call sym._add_label
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x28]
test eax, eax
jne 0x4055c0
mov edx, ecx
mov eax, ebx
add esi, 1
call sym._defer_disasm
cmp esi, 0xa
jne 0x4055c8
lea eax, [esp + 0x458]
mov edi, dword [esp + 0x34]
xor esi, esi
mov dword [esp + 0x458], 0x5f746e69
mov word [esp + 0x45c], 0x30
mov dword [esp + 0x18], eax
jmp 0x40563c
add esi, 1
cmp esi, 7
je 0x406bca
movzx ecx, word [edi + esi*4 + 0x64]
lea eax, [esi + 0x31]
mov edx, dword [esp + 0x18]
mov byte [esp + 0x45c], al
movzx eax, word [edi + esi*4 + 0x66]
shl ecx, 0x10
or ecx, eax
mov eax, ebx
mov dword [esp + 0x28], ecx
call sym._add_label
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x28]
test eax, eax
jne 0x405630
mov edx, ecx
mov eax, ebx
call sym._defer_disasm
jmp 0x405630
mov byte [esp + 0x28], 1
mov ebx, esi
jmp 0x40545d
cmp edi, dword [ebp + 8]
jge 0x40786a
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], 0
add ebx, 2
mov dword [esp + 4], 0
mov eax, dword [eax + edi*4]
movzx edi, bl
mov dword [esp], eax
call sub.msvcrt.dll_strtol
mov dword [esp + 0x38], eax
jmp 0x40545d
mov byte [esp + 0x30], 1
mov ebx, esi
jmp 0x40545d
mov byte [esp + 0x18], 1
mov ebx, esi
jmp 0x40545d
mov byte [esp + 0x2d], 1
mov ebx, esi
jmp 0x40545d
cmp edi, dword [ebp + 8]
jge 0x407831
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], 0x409467
lea edi, [eax + edi*4]
mov eax, dword [edi]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov esi, eax
test eax, eax
je 0x407802
lea eax, [esp + 0x58]
mov dword [esp + 0x34], eax
jmp 0x40573f
cmp byte [esp + 0x58], 0
jne 0x4057b8
mov eax, dword [esp + 0x34]
mov dword [esp + 8], esi
mov dword [esp + 4], 0x400
mov dword [esp], eax
call sub.msvcrt.dll_fgets
test eax, eax
jne 0x405738
mov dword [esp], esi
add ebx, 2
movzx edi, bl
call sub.msvcrt.dll_fclose
jmp 0x40545d
mov byte [esp + 0x24], 1
mov ebx, esi
jmp 0x40545d
mov byte [esp + 0x2e], 1
mov ebx, esi
jmp 0x40545d
mov byte [esp + 0x2f], 1
mov ebx, esi
jmp 0x40545d
mov eax, dword [esp + 0x3c]
add edx, 1
mov ecx, ebx
call sym._add_label
jmp case.0x40540c.1
lea eax, [esp + 0xfc0]
mov dword [esp + 8], 0x10
mov dword [esp + 4], eax
mov eax, dword [esp + 0x34]
mov dword [esp], eax
call sub.msvcrt.dll_strtol
mov dword [esp + 0x20], eax
test eax, eax
je 0x40573f
mov edx, eax
mov eax, dword [esp + 0x3c]
call sym._defer_disasm
mov eax, dword [esp + 0xfc0]
cmp byte [eax], 0x3d
je 0x406ab0
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x3c]
call sym._reference
jmp 0x40573f
mov eax, dword [esp + 0x1c]
mov edi, 0x9300
cmp eax, 0x9300
cmovle edi, eax
mov dword [esp], edi
mov esi, edi
mov dword [esp + 0x30], edi
call sym._malloc
mov dword [esp + 8], esi
mov edi, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 4], 1
mov dword [esp], edi
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fread
cmp esi, eax
jne 0x406b75
mov dword [esp + 8], 0x10
mov dword [esp + 4], edi
mov dword [esp], str.SEGADISCSYSTEM
call sym._memcmp
test eax, eax
je 0x40590b
lea eax, [edi + 0x10]
mov dword [esp + 8], 0x10
mov dword [esp + 4], eax
mov dword [esp], str.SEGADISCSYSTEM
call sym._memcmp
test eax, eax
jne 0x405a3f
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x38], 0x9300
cmp eax, 0x92ff
jg 0x4058bd
mov ecx, 0x930
cdq
idiv ecx
imul eax, eax, 0x930
mov dword [esp + 0x38], eax
mov esi, 0x10
mov dword [esp + 0x34], ebx
mov ebx, esi
mov esi, edi
lea eax, [edi + ebx]
mov dword [esp], esi
add ebx, 0x930
add esi, 0x800
mov dword [esp + 8], 0x800
mov dword [esp + 4], eax
call sym._memmove
cmp dword [esp + 0x38], ebx
ja 0x4058ca
mov eax, dword [esp + 0x38]
mov ecx, 0x930
xor edx, edx
mov ebx, dword [esp + 0x34]
div ecx
shl eax, 0xb
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov ecx, dword [esp + 0x30]
mov eax, edi
sar ecx, 1
nop
rol word [eax], 8
add eax, 2
mov edx, eax
sub edx, edi
sar edx, 1
cmp edx, ecx
jl 0x405920
cmp byte [esp + 0x2d], 0
jne 0x4076ab
movzx eax, word [edi + 0x40]
movzx edx, word [edi + 0x42]
mov ecx, dword [esp + 0x30]
shl eax, 0x10
or eax, edx
movzx edx, word [edi + 0x46]
mov esi, eax
movzx eax, word [edi + 0x44]
and esi, 0xfffff800
shl eax, 0x10
mov dword [esp + 0x20], esi
or eax, edx
lea edx, [ecx - 0x20]
add eax, esi
cmp edx, esi
jb 0x407666
mov esi, dword [esp + 0x30]
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x34], edi
cmp eax, esi
movzx edx, word [edi + ecx + 0x1a]
cmova eax, esi
xor esi, esi
mov dword [esp + 0x28], eax
movzx eax, word [edi + ecx + 0x18]
shl eax, 0x10
or eax, edx
add eax, ecx
mov dword [esp + 0x38], eax
mov eax, 0x6000
sub eax, ecx
mov dword [esp + 0x24], eax
jmp 0x4059db
mov eax, dword [esi*4 + 0x409d98]
add edi, dword [esp + 0x24]
mov edx, eax
mov eax, ebx
mov ecx, edi
call sym._add_label
cmp dword [esp + 0x3c], 0
je 0x40769d
cmp byte [esp + 0x18], 0
je 0x40769d
add esi, 1
lea eax, [esi + esi]
add eax, dword [esp + 0x38]
cmp dword [esp + 0x28], eax
jbe 0x4065ad
mov ecx, dword [esp + 0x34]
and eax, 0xfffffffe
movzx eax, word [ecx + eax]
test ax, ax
je 0x4065ad
mov ecx, dword [esp + 0x38]
lea edi, [eax + ecx]
cmp edi, dword [esp + 0x30]
jae 0x4065ad
cmp esi, 2
jbe 0x4059ac
lea ecx, [esp + 0xfc0]
mov dword [esp + 8], esi
mov dword [esp], ecx
mov dword [esp + 4], str.usercall_u
call sym._sprintf
lea ecx, [esp + 0xfc0]
mov eax, ecx
jmp 0x4059b3
cmp dword [esp + 0x1c], 0x8000
jg 0x406c73
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x38]
add eax, esi
sar esi, 1
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov dword [esp + 0x34], edi
mov ecx, dword [esp + 0x34]
mov eax, ecx
lea esi, [esi]
nop
rol word [eax], 8
add eax, 2
mov edx, eax
sub edx, ecx
sar edx, 1
cmp edx, esi
jl 0x405a78
jmp 0x405564
mov eax, dword [esp + 0x20]
mov dword [esp + 8], 0x1000
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
lea eax, [esp + 0xfc0]
mov dword [esp], eax
mov dword [esp + 0x28], eax
call sub.msvcrt.dll_fread
cmp eax, 0x1000
je 0x406d6f
movzx eax, word [esp + 0x514]
mov edx, dword [esp + 0x584]
imul eax, eax, 0x4a
cmp edx, eax
je 0x406cff
mov eax, dword [esp + 0x510]
mov esi, dword [esp + 0x1c]
xor edi, edi
mov edx, dword [esp + 0x508]
mov dword [esp + 0x38], eax
lea eax, [esi + eax - 0x1000]
xor esi, esi
mov dword [esp + 0x3c], eax
mov eax, ebx
call sym._defer_disasm
mov ecx, dword [esp + 0x508]
mov edx, str.main_entry_link
mov eax, ebx
call sym._add_label
cmp word [esp + 0x514], 0
je 0x405b7a
lea esi, [esi]
nop
mov eax, dword [esp + 0xfb8]
cmp byte [esp + 0x30], 0
mov edx, dword [eax + edi + 0x2c]
je 0x405b4b
cmp dword [esp + 0x510], edx
je 0x405b52
mov eax, ebx
call sym._defer_disasm
mov edx, dword [esp + 0xfb8]
mov eax, ebx
add esi, 1
add edx, edi
add edi, 0x4c
mov ecx, dword [edx + 0x2c]
add edx, 2
call sym._add_label
movzx eax, word [esp + 0x514]
cmp eax, esi
jg 0x405b30
mov eax, dword [esp + 0x20]
mov dword [esp + 8], 0
mov dword [esp + 4], 0x1000
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov edi, dword [esp + 0x1c]
sub edi, 0x1000
mov dword [esp], edi
call sym._malloc
mov ecx, 2
mov dword [esp + 4], 2
mov dword [esp + 0x34], eax
mov eax, edi
cdq
idiv ecx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0xc], ecx
mov esi, eax
mov dword [esp + 8], eax
mov eax, dword [esp + 0x34]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp esi, eax
je 0x405c0b
mov eax, dword [ebp + 0xc]
mov edx, dword [eax + 4]
mov dword [esp], 2
mov dword [esp + 0x28], edx
call dword [0x40801c]
mov edx, dword [esp + 0x28]
mov dword [esp + 4], str.Failure_while_reading_file__s_n
mov dword [esp], eax
mov dword [esp + 8], edx
call sym._fprintf
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
sub edi, 1
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x34]
jle 0x405c39
lea esi, [esi]
rol word [eax], 8
add eax, 2
mov edx, eax
sub edx, ecx
sar edx, 1
cmp esi, edx
jg 0x405c28
cmp byte [esp + 0x30], 0
je 0x405c78
mov esi, dword [esp + 0x34]
movzx edx, word [esi + 4]
movzx eax, word [esi + 6]
shl edx, 0x10
or edx, eax
mov eax, ebx
call sym._defer_disasm
movzx ecx, word [esi + 4]
movzx eax, word [esi + 6]
mov edx, str.reset
shl ecx, 0x10
or ecx, eax
mov eax, ebx
call sym._add_label
lea esi, [esi]
cmp byte [esp + 0x24], 0
je 0x406178
cmp byte [esp + 0x2d], 0
je 0x4065d2
mov ecx, 0x280
mov edx, str._bios_reset
mov eax, ebx
call sym._weak_label
mov ecx, 0x284
mov edx, str._bios_entry
mov eax, ebx
call sym._weak_label
mov ecx, 0x288
mov edx, str._bios_init
mov eax, ebx
call sym._weak_label
mov ecx, 0x28c
mov edx, str._bios_init_sp
mov eax, ebx
call sym._weak_label
mov ecx, 0x290
mov edx, str._bios_vint
mov eax, ebx
call sym._weak_label
mov ecx, 0x294
mov edx, str._bios_set_hint
mov eax, ebx
call sym._weak_label
mov ecx, 0x298
mov edx, str._bios_poll_io
mov eax, ebx
call sym._weak_label
mov ecx, 0x29c
mov edx, str._bios_detect_io
mov eax, ebx
call sym._weak_label
mov ecx, 0x2a0
mov edx, str._bios_clear_vram
mov eax, ebx
call sym._weak_label
mov ecx, 0x2a4
mov edx, str._bios_clear_nmtbl
mov eax, ebx
call sym._weak_label
mov ecx, 0x2a8
mov edx, str._bios_clear_vsram
mov eax, ebx
call sym._weak_label
mov ecx, 0x2ac
mov edx, str._bios_init_vdp
mov eax, ebx
call sym._weak_label
mov ecx, 0x2b0
mov edx, str._bios_vdp_loadregs
mov eax, ebx
call sym._weak_label
mov ecx, 0x2b4
mov edx, str._bios_vdp_fill
mov eax, ebx
call sym._weak_label
mov ecx, 0x2b8
mov edx, str._bios_clear_vram_range
mov eax, ebx
call sym._weak_label
mov ecx, 0x2bc
mov edx, str._bios_clear_vram_range_dma
mov eax, ebx
call sym._weak_label
mov ecx, 0x2c0
mov edx, str._bios_vram_dma_fill
mov eax, ebx
call sym._weak_label
mov ecx, 0x2c4
mov edx, str._bios_update_nmtbl
mov eax, ebx
call sym._weak_label
mov ecx, 0x2c8
mov edx, str._bios_update_nmtbl_template
mov eax, ebx
call sym._weak_label
mov ecx, 0x2cc
mov edx, str._bios_fill_nmtbl
mov eax, ebx
call sym._weak_label
mov ecx, 0x2d0
mov edx, str._bios_vdp_dma
mov eax, ebx
call sym._weak_label
mov ecx, 0x2d4
mov edx, str._bios_vdp_dma_wordram
mov eax, ebx
call sym._weak_label
mov ecx, 0x2d8
mov edx, str._bios_vdp_display_enable
mov eax, ebx
call sym._weak_label
mov ecx, 0x2dc
mov edx, str._bios_vdp_display_disable
mov eax, ebx
call sym._weak_label
mov ecx, 0x2e0
mov edx, str._bios_pal_buffer
mov eax, ebx
call sym._weak_label
mov ecx, 0x2e4
mov edx, str._bios_pal_buffer_update
mov eax, ebx
call sym._weak_label
mov ecx, 0x2e8
mov edx, str._bios_pal_dma
mov eax, ebx
call sym._weak_label
mov ecx, 0x2ec
mov edx, str._bios_gfx_decomp
mov eax, ebx
call sym._weak_label
mov ecx, 0x2f0
mov edx, str._bios_gfx_decomp_ram
mov eax, ebx
call sym._weak_label
mov ecx, 0x2f4
mov edx, str._bios_update_sprites
mov eax, ebx
call sym._weak_label
mov ecx, 0x2f8
mov edx, str._bios_clear_ram
mov eax, ebx
call sym._weak_label
mov ecx, 0x300
mov edx, str._bios_display_sprite
mov eax, ebx
call sym._weak_label
mov ecx, 0x304
mov edx, str._bios_wait_vint
mov eax, ebx
call sym._weak_label
mov ecx, 0x308
mov edx, str._bios_wait_vint_flags
mov eax, ebx
call sym._weak_label
mov ecx, 0x30c
mov edx, str._bios_dma_sat
mov eax, ebx
call sym._weak_label
mov ecx, 0x314
mov edx, str._bios_set_hint_direct
mov eax, ebx
call sym._weak_label
mov ecx, 0x318
mov edx, str._bios_disable_hint
mov eax, ebx
call sym._weak_label
mov ecx, 0x31c
mov edx, str._bios_print
mov eax, ebx
call sym._weak_label
mov ecx, 0x320
mov edx, str._bios_load_user_font
mov eax, ebx
call sym._weak_label
mov ecx, 0x324
mov edx, str._bios_load_bios_font
mov eax, ebx
call sym._weak_label
mov ecx, 0x328
mov edx, str._bios_load_bios_font_default
mov eax, ebx
call sym._weak_label
mov ecx, 0x338
mov edx, str._bios_prng_mod
mov eax, ebx
call sym._weak_label
mov ecx, 0x33c
mov edx, str._bios_prng
mov eax, ebx
call sym._weak_label
mov ecx, 0x340
mov edx, str._bios_clear_comm
mov eax, ebx
call sym._weak_label
mov ecx, 0x344
mov edx, str._bios_comm_update
mov eax, ebx
call sym._weak_label
mov ecx, 0x364
mov edx, str._bios_sega_logo
mov eax, ebx
call sym._weak_label
mov ecx, 0x368
mov edx, str._bios_set_vint
mov eax, ebx
call sym._weak_label
mov ecx, 0x200000
mov edx, str.WORD_RAM
mov eax, ebx
call sym._weak_label
mov ecx, 0xa12000
mov edx, str.CD_RESET_IFL2
mov eax, ebx
call sym._weak_label
mov ecx, 0xa12001
mov edx, str.CD_RESET_IFL2_BYTE
mov eax, ebx
call sym._weak_label
mov ecx, 0xa12002
mov edx, str.CD_WRITE_PROTECT
mov eax, ebx
call sym._weak_label
mov ecx, 0xa12003
mov edx, str.CD_MEM_MODE
mov eax, ebx
call sym._weak_label
mov ecx, 0xa12004
mov edx, str.CDC_CTRL
mov eax, ebx
call sym._weak_label
mov ecx, 0xa12006
mov edx, str.HINT_VECTOR
mov eax, ebx
call sym._weak_label
mov ecx, 0xa12008
mov edx, str.CDC_HOST_DATA
mov eax, ebx
call sym._weak_label
mov ecx, 0xa1200c
mov edx, str.STOP_WATCH
mov eax, ebx
call sym._weak_label
mov ecx, 0xa1200e
mov edx, str.COMM_MAIN_FLAG
mov eax, ebx
call sym._weak_label
mov ecx, 0xa1200f
mov edx, str.COMM_SUB_FLAG
mov eax, ebx
call sym._weak_label
mov ecx, 0xa12010
mov edx, str.COMM_CMD0
mov eax, ebx
call sym._weak_label
mov ecx, 0xa12012
mov edx, str.COMM_CMD1
mov eax, ebx
call sym._weak_label
mov ecx, 0xa12014
mov edx, str.COMM_CMD2
mov eax, ebx
call sym._weak_label
mov ecx, 0xa12016
mov edx, str.COMM_CMD3
mov eax, ebx
call sym._weak_label
mov ecx, 0xa12018
mov edx, str.COMM_CMD4
mov eax, ebx
call sym._weak_label
mov ecx, 0xa1201a
mov edx, str.COMM_CMD5
mov eax, ebx
call sym._weak_label
mov ecx, 0xa1201c
mov edx, str.COMM_CMD6
mov eax, ebx
call sym._weak_label
mov ecx, 0xa1201e
mov edx, str.COMM_CMD7
mov eax, ebx
call sym._weak_label
mov ecx, 0xa12020
mov edx, str.COMM_STATUS0
mov eax, ebx
call sym._weak_label
mov ecx, 0xa12022
mov edx, str.COMM_STATUS1
mov eax, ebx
call sym._weak_label
mov ecx, 0xa12024
mov edx, str.COMM_STATUS2
mov eax, ebx
call sym._weak_label
mov ecx, 0xa12026
mov edx, str.COMM_STATUS3
mov eax, ebx
call sym._weak_label
mov ecx, 0xa12028
mov edx, str.COMM_STATUS4
mov eax, ebx
call sym._weak_label
mov ecx, 0xa1202a
mov edx, str.COMM_STATUS5
mov eax, ebx
call sym._weak_label
mov ecx, 0xa1202c
mov edx, str.COMM_STATUS6
mov eax, ebx
call sym._weak_label
mov ecx, 0xa1202e
mov edx, str.COMM_STATUS7
mov eax, ebx
call sym._weak_label
mov eax, dword [esp + 0x38]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x54], eax
jmp 0x4061a5
mov eax, dword [edi]
mov dword [ebx + 8], eax
mov dword [esp], edi
call sym._free
mov edi, dword [ebx + 8]
test edi, edi
je 0x4063de
mov esi, dword [edi + 8]
mov eax, ebx
mov edx, esi
call sym._is_visited
test al, al
jne 0x406198
mov eax, dword [ebx + 0xc]
and eax, esi
cmp eax, dword [esp + 0x3c]
jae 0x406198
cmp eax, dword [esp + 0x38]
jb 0x406198
mov eax, dword [edi]
mov dword [ebx + 8], eax
mov dword [esp], edi
mov edi, esi
call sym._free
mov edx, dword [ebx + 0xc]
and edi, edx
cmp esi, dword [esp + 0x38]
jae 0x40621d
jmp 0x4061a5
cmp al, 0x11
je 0x4062b9
cmp al, 0x1a
je 0x406340
cmp al, 0x1b
je 0x406390
lea esi, [esi]
nop
mov edx, dword [ebx + 0xc]
mov edi, edx
and edi, esi
cmp esi, dword [esp + 0x38]
jb 0x4061a5
cmp edi, dword [esp + 0x3c]
ja 0x4061a5
mov eax, dword [ebx + 4]
mov ecx, dword [ebx + 0x14]
test eax, eax
je 0x406310
shr edi, cl
mov edx, 1
mov ecx, edi
shr edi, 3
and ecx, 7
shl edx, cl
or byte [eax + edi], dl
lea edx, [esp + 0x458]
mov ecx, esi
lea eax, [esp + 0x4c]
call sym._m68k_decode.constprop.0
lea ecx, [esp + 0x460]
lea edx, [esp + 0x458]
mov esi, eax
mov eax, ebx
call sym._check_reference
lea ecx, [esp + 0x46c]
lea edx, [esp + 0x458]
mov eax, ebx
call sym._check_reference
movzx eax, byte [esp + 0x458]
cmp al, 0x45
sete cl
cmp al, 0x37
sete dl
or cl, dl
jne 0x4061a5
mov edx, eax
and edx, 0xffffffdf
cmp dl, 0x19
je 0x4061a5
mov edx, eax
and edx, 0xfffffffb
cmp dl, 8
jne 0x4061f0
mov edi, dword [esp + 0x464]
add edi, dword [esp + 0x45c]
mov eax, ebx
add edi, 2
mov edx, edi
call sym._reference
mov eax, dword [esp + 0x458]
mov edx, edi
and eax, 0xff00ff
cmp eax, 8
mov eax, ebx
je 0x4062f8
call sym._defer_disasm
jmp 0x406210
call sym._is_visited
test al, al
jne 0x4061a5
mov esi, edi
jmp 0x406210
add edx, 1
mov dword [esp], 1
shr edx, cl
mov dword [esp + 0x34], ecx
shr edx, 3
mov dword [esp + 4], edx
call sym._calloc
mov ecx, dword [esp + 0x34]
mov dword [ebx + 4], eax
jmp 0x406231
movzx eax, byte [esp + 0x460]
mov esi, dword [esp + 0x464]
lea edx, [eax - 9]
cmp dl, 1
jbe 0x406371
cmp al, 0xb
jne 0x4061a5
mov edx, dword [esp + 0x45c]
mov eax, dword [esp + 0x468]
lea esi, [edx + eax + 2]
mov edx, esi
mov eax, ebx
call sym._is_visited
test al, al
je 0x406210
jmp 0x4061a5
movzx eax, byte [esp + 0x460]
lea edx, [eax - 9]
cmp dl, 1
jbe 0x4063d0
cmp al, 0xb
jne 0x406210
mov eax, dword [esp + 0x468]
mov edx, dword [esp + 0x45c]
lea edx, [edx + eax + 2]
mov eax, ebx
call sym._defer_disasm
jmp 0x406210
mov edx, dword [esp + 0x464]
mov eax, ebx
jmp 0x4062e8
cmp byte [esp + 0x2f], 0
jne 0x406576
mov esi, dword [esp + 0x38]
cmp dword [esp + 0x3c], esi
jbe 0x406520
mov esi, dword [esp + 0x38]
jmp 0x40640d
add esi, 2
cmp esi, dword [esp + 0x3c]
jae 0x406520
mov edx, esi
mov eax, ebx
call sym._is_visited
test al, al
je 0x406400
mov ecx, esi
lea edx, [esp + 0x458]
lea eax, [esp + 0x4c]
call sym._m68k_decode.constprop.0
cmp byte [esp + 0x2f], 0
je 0x4064d0
mov dword [esp + 4], ebx
lea eax, [esp + 0x58]
mov ecx, 1
mov dword [esp], sym._format_label
mov edx, eax
mov dword [esp + 0x38], eax
lea eax, [esp + 0x458]
call sym._m68k_disasm_ex
mov eax, dword [ebx + 0xc]
lea edx, [esp + 0xfc0]
and eax, esi
call sym._tern_sortable_int_key
mov eax, dword [ebx]
lea edx, [esp + 0xfc0]
call sym._tern_find_ptr
mov edi, eax
test eax, eax
je 0x4064a0
mov eax, dword [eax + 4]
test eax, eax
jne 0x406543
mov eax, dword [edi + 0xc]
mov dword [esp], str.ADR__X:_n
mov dword [esp + 4], eax
call sym._printf
cmp byte [esp + 0x2e], 0
je 0x40652a
mov eax, dword [esp + 0x45c]
mov dword [esp], str._t_s_t__X_n
mov dword [esp + 8], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 4], eax
call sym._printf
jmp 0x406400
mov dword [esp], 0
lea edi, [esp + 0x58]
xor ecx, ecx
add esi, 2
mov dword [esp + 4], 0
mov edx, edi
lea eax, [esp + 0x458]
call sym._m68k_disasm_ex
mov eax, dword [esp + 0x45c]
mov dword [esp + 8], edi
mov dword [esp], str._X:__s_n
mov dword [esp + 4], eax
call sym._printf
cmp esi, dword [esp + 0x3c]
jb 0x40640d
lea esi, [esi]
nop
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x38]
mov dword [esp], str._t_s_n
mov dword [esp + 4], eax
call sym._printf
jmp 0x406400
xor edx, edx
mov dword [esp + 0x34], ebx
mov ebx, edi
mov edi, edx
lea esi, [esi]
mov eax, dword [ebx]
mov eax, dword [eax + edi*4]
mov dword [esp], str._s:_n
add edi, 1
mov dword [esp + 4], eax
call sym._printf
cmp dword [ebx + 4], edi
ja 0x406550
mov ebx, dword [esp + 0x34]
jmp 0x4064a0
mov eax, dword [ebx]
test eax, eax
je 0x40659c
lea edx, [esp + 0xfc0]
mov dword [esp + 4], 0
lea ecx, [esp + 0x4c]
mov dword [esp], edx
mov edx, sym._print_label_def
call sym._tern_foreach_int
mov dword [esp], 0x409172
call sym._puts
jmp 0x4063e9
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x38], 0x6000
mov edi, dword [esp + 0x34]
sub eax, esi
add edi, esi
add eax, 0x6000
mov dword [esp + 0x34], edi
mov dword [esp + 0x3c], eax
mov eax, ebx
mov ecx, 0x5e80
mov edx, str.bios_common_work
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f0a
mov edx, str._setjmptbl
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f10
mov edx, str._waitvsync
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f16
mov edx, str._buram
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f1c
mov edx, str._cdboot
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f22
mov edx, str._cdbios
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f28
mov edx, str._usercall0
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f2e
mov edx, str._usercall1
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f34
mov edx, str._usercall2
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f36
mov edx, str._usercall2Address
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f3a
mov edx, str._usercall3
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f40
mov edx, str._adrerr
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f42
mov edx, str._adrerrAddress
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f46
mov edx, str._coderr
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f48
mov edx, str._coderrAddress
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f4c
mov edx, str._diverr
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f4e
mov edx, str._diverrAddress
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f52
mov edx, str._chkerr
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f54
mov edx, str._chkerrAddress
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f58
mov edx, str._trperr
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f5a
mov edx, str._trperrAddress
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f5e
mov edx, str._spverr
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f60
mov edx, str._spverrAddress
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f64
mov edx, str._trace
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f66
mov edx, str._traceAddress
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f6a
mov edx, str._nocod0
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f6c
mov edx, str._nocod0Address
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f70
mov edx, str._nocod0
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f72
mov edx, str._nocod0Address
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f76
mov edx, str._slevel1
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f78
mov edx, str._slevel1Address
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f7c
mov edx, str._slevel2
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f7e
mov edx, str._slevel2Address
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f82
mov edx, str._slevel3
call sym._weak_label
mov eax, ebx
mov ecx, 0x5f84
mov edx, str._slevel3Address
call sym._weak_label
mov eax, ebx
mov ecx, 0x80000
mov edx, str.WORD_RAM_2M
call sym._weak_label
mov eax, ebx
mov ecx, 0xc0000
mov edx, str.WORD_RAM_1M
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff8000
mov edx, str.LED_CONTROL
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff8001
mov edx, str.VERSION_RESET
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff8002
mov edx, str.MEM_MODE_WORD
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff8003
mov edx, str.MEM_MODE_BYTE
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff8004
mov edx, str.CDC_CTRL
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff8005
mov edx, str.CDC_AR
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff8006
mov edx, str.CDC_REG_DATA_WORD
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff8007
mov edx, str.CDC_REG_DATA
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff8008
mov edx, str.CDC_HOST_DATA
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff800a
mov edx, str.CDC_DMA_ADDR
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff800c
mov edx, str.STOP_WATCH
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff800e
mov edx, str.COMM_MAIN_FLAG
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff800f
mov edx, str.COMM_SUB_FLAG
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff8010
mov edx, str.COMM_CMD0
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff8012
mov edx, str.COMM_CMD1
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff8014
mov edx, str.COMM_CMD2
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff8016
mov edx, str.COMM_CMD3
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff8018
mov edx, str.COMM_CMD4
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff801a
mov edx, str.COMM_CMD5
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff801c
mov edx, str.COMM_CMD6
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff801e
mov edx, str.COMM_CMD7
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff8020
mov edx, str.COMM_STATUS0
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff8022
mov edx, str.COMM_STATUS1
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff8024
mov edx, str.COMM_STATUS2
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff8026
mov edx, str.COMM_STATUS3
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff8028
mov edx, str.COMM_STATUS4
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff802a
mov edx, str.COMM_STATUS5
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff802c
mov edx, str.COMM_STATUS6
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff802e
mov edx, str.COMM_STATUS7
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff8030
mov edx, str.TIMER_WORD
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff8031
mov edx, str.TIMER
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff8032
mov edx, str.INT_MASK_WORD
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff8033
mov edx, str.INT_MASK
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff8034
mov edx, str.CDD_FADER
call sym._weak_label
mov eax, ebx
mov ecx, 0xffff8036
mov edx, str.CDD_CTRL_WORD
call sym._weak_label
mov ecx, 0xffff8037
mov edx, str.CDD_CTRL_BYTE
mov eax, ebx
call sym._weak_label
jmp 0x406178
lea ecx, [eax + 1]
movzx eax, byte [eax + 1]
mov dword [esp + 0x1c], ecx
test al, al
je 0x406aff
mov dword [esp + 0x14], esi
mov edi, dword [esp + 0x1c]
mov edx, eax
lea esi, [esi]
movsx esi, dl
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll_isprint]
test eax, eax
je 0x406aec
mov dword [esp], esi
call dbg.isblank
test eax, eax
je 0x406af7
movzx edx, byte [edi + 1]
add edi, 1
test dl, dl
jne 0x406ad0
mov dword [esp + 0x1c], edi
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x1c]
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov eax, ecx
mov ecx, dword [esp + 0x1c]
not eax
lea edi, [ecx + eax - 2]
cmp ecx, edi
jae 0x406b5f
mov byte [esp + 0x2c], bl
mov dword [esp + 0x14], esi
mov esi, edi
mov edi, dword [esp + 0x1c]
lea esi, [esi]
nop
movsx ebx, byte [esi]
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_isprint]
test eax, eax
je 0x406b4c
mov dword [esp], ebx
call dbg.isblank
test eax, eax
je 0x406b56
mov byte [esi], 0
sub esi, 1
cmp edi, esi
jne 0x406b30
mov esi, dword [esp + 0x14]
movzx ebx, byte [esp + 0x2c]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x3c]
call sym._add_label
jmp 0x40573f
mov eax, dword [ebp + 0xc]
mov ebx, dword [eax + 4]
mov dword [esp], 2
call dword [0x40801c]
mov dword [esp + 4], str.Failure_while_reading_file__s_n
mov dword [esp + 8], ebx
mov dword [esp], eax
call sym._fprintf
mov eax, 1
jmp 0x406522
mov ecx, esi
mov edx, str.start
mov eax, ebx
call sym._add_label
mov edx, esi
mov eax, ebx
call sym._defer_disasm
mov dword [esp + 0x30], 0
jmp 0x4055af
lea edi, [esp + 0xfc0]
mov ecx, esi
mov esi, str.trap_0
mov dword [esp + 0x28], edi
rep movsb byte es:[edi], byte [esi]
xor edi, edi
cmp edi, 9
jg 0x406c21
mov eax, dword [esp + 0x34]
lea edx, [edi + 0x30]
mov byte [esp + 0xfc5], dl
movzx ecx, word [eax + edi*4 + 0x64]
movzx edx, word [eax + edi*4 + 0x66]
mov eax, ebx
shl ecx, 0x10
mov esi, ecx
or esi, edx
mov edx, dword [esp + 0x28]
mov ecx, esi
call sym._add_label
mov ecx, dword [esp + 0x30]
test ecx, ecx
je 0x406c68
add edi, 1
cmp edi, 9
jle 0x406be5
mov eax, dword [esp + 0x34]
lea edx, [edi + 0x57]
mov byte [esp + 0xfc5], dl
movzx ecx, word [eax + edi*4 + 0x64]
movzx edx, word [eax + edi*4 + 0x66]
mov eax, ebx
shl ecx, 0x10
mov esi, ecx
or esi, edx
mov edx, dword [esp + 0x28]
mov ecx, esi
call sym._add_label
mov edx, dword [esp + 0x30]
test edx, edx
je 0x406c68
add edi, 1
cmp edi, 0x10
jne 0x406be0
jmp 0x405c78
mov edx, esi
mov eax, ebx
call sym._defer_disasm
jmp 0x406c55
mov esi, dword [esp + 0x1c]
mov dword [esp], edi
mov dword [esp + 4], esi
sar esi, 1
sub esi, 0x4000
call sym._realloc
mov dword [esp + 8], 0
mov edi, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 4], 0x8000
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov eax, dword [esp + 0x20]
mov dword [esp + 8], esi
mov dword [esp + 4], 2
mov dword [esp + 0xc], eax
lea eax, [edi + 0x8000]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, esi
je 0x405a4d
mov eax, dword [ebp + 0xc]
mov esi, dword [eax + 4]
mov dword [esp], 2
call dword [0x40801c]
mov dword [esp + 4], str.Failure_while_reading_file__s_n
mov dword [esp + 8], esi
mov dword [esp], eax
call sym._fprintf
jmp 0x405a4d
mov dword [esp], edx
mov edi, dword [esp + 0x510]
call sym._malloc
mov dword [esp + 8], 0
mov esi, eax
mov eax, dword [esp + 0x580]
add eax, 0x1000
sub eax, edi
mov edi, dword [esp + 0x20]
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.msvcrt.dll_fseek
mov eax, dword [esp + 0x584]
mov dword [esp + 0xc], edi
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], esi
call sub.msvcrt.dll_fread
cmp eax, dword [esp + 0x584]
je 0x4074f6
mov dword [esp], esi
call sym._free
jmp 0x405ade
movzx eax, byte [esp + 0xfc0]
mov dword [esp], 0x20
lea esi, [esp + 0x4c]
lea ecx, [esp + 0x45c]
shl eax, 8
mov edx, eax
lea eax, [esp + 0xfc2]
mov dword [esp + 0x4c], eax
movzx eax, byte [esp + 0xfc1]
or eax, edx
lea edx, [esp + 0x45a]
mov word [esp + 0x458], ax
lea eax, [esp + 0x458]
mov dword [esp + 0x18], eax
mov eax, esi
lea esi, [esp + 0x4c]
call sym._string_
mov dword [esp], 0x20
mov eax, esi
lea ecx, [esp + 0x47e]
lea edx, [esp + 0x47c]
lea esi, [esp + 0x4c]
call sym._string_
mov dword [esp], 0x20
mov eax, esi
lea ecx, [esp + 0x4a0]
lea edx, [esp + 0x49e]
lea esi, [esp + 0x4c]
call sym._string_
mov dword [esp], 0x41
mov eax, esi
lea ecx, [esp + 0x4c2]
lea edx, [esp + 0x4c0]
call sym._string_
mov edi, dword [esp + 0x4c]
lea eax, [edi + 1]
lea edx, [edi + 2]
mov ecx, edi
mov dword [esp + 0x4c], eax
movzx eax, byte [edi]
lea esi, [edi + 4]
mov dword [esp + 0x4c], edx
movzx edx, byte [edi + 1]
shl eax, 0x18
shl edx, 0x10
or eax, edx
lea edx, [edi + 3]
mov dword [esp + 0x4c], edx
movzx edx, byte [edi + 2]
mov dword [esp + 0x4c], esi
movzx esi, byte [edi + 3]
shl edx, 8
or eax, esi
mov esi, edi
or eax, edx
add esi, 0x1c
mov dword [esp + 0x504], eax
mov eax, dword [edi + 4]
mov dword [esp + 0x38], esi
bswap eax
mov dword [esp + 0x508], eax
mov eax, dword [edi + 8]
bswap eax
mov dword [esp + 0x50c], eax
mov eax, dword [edi + 0xc]
bswap eax
mov dword [esp + 0x510], eax
movzx edi, word [edi + 0x10]
rol di, 8
mov word [esp + 0x514], di
movzx edi, word [ecx + 0x12]
rol di, 8
mov word [esp + 0x516], di
movzx edi, word [ecx + 0x14]
rol di, 8
mov word [esp + 0x518], di
movzx edi, word [ecx + 0x16]
rol di, 8
mov word [esp + 0x51a], di
movzx edi, word [ecx + 0x18]
rol di, 8
mov word [esp + 0x51c], di
movzx eax, byte [ecx + 0x1a]
mov dword [esp + 0x4c], esi
mov edx, eax
movzx eax, byte [ecx + 0x1b]
shl edx, 8
or eax, edx
mov word [esp + 0x51e], ax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x34], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x14], ebx
mov eax, dword [esp + 0x38]
mov ebx, dword [esp + 0x3c]
lea esi, [eax + 0x20]
lea edx, [eax + 1]
lea edi, [eax + 4]
add ebx, 8
mov dword [esp + 0x4c], edx
movzx edx, byte [eax]
mov ecx, edx
lea edx, [eax + 2]
mov dword [esp + 0x4c], edx
movzx edx, byte [eax + 1]
shl ecx, 0x18
shl edx, 0x10
or edx, ecx
lea ecx, [eax + 3]
add eax, 8
mov dword [esp + 0x4c], ecx
movzx ecx, byte [eax - 6]
mov dword [esp + 0x4c], edi
movzx edi, byte [eax - 5]
shl ecx, 8
or edx, edi
or edx, ecx
mov dword [ebx + 0xc0], edx
movzx edi, byte [eax - 4]
movzx edx, byte [eax - 3]
shl edi, 0x18
shl edx, 0x10
or edi, edx
movzx edx, byte [eax - 2]
mov dword [esp + 0x4c], eax
movzx ecx, byte [eax - 1]
shl edx, 8
or edx, edi
or edx, ecx
mov dword [ebx + 0xc4], edx
cmp esi, eax
jne 0x406f1e
add dword [esp + 0x3c], 0x20
mov eax, dword [esp + 0x3c]
lea ebx, [esp + 0x4b8]
cmp eax, ebx
je 0x406fb0
mov dword [esp + 0x38], esi
jmp 0x406f13
mov esi, dword [esp + 0x38]
lea edi, [esp + 0x5a8]
mov ecx, 0x200
mov ebx, dword [esp + 0x14]
movzx eax, byte [esi + 0x20]
shl eax, 0x18
mov edx, eax
movzx eax, byte [esi + 0x21]
shl eax, 0x10
or eax, edx
movzx edx, byte [esi + 0x23]
or eax, edx
movzx edx, byte [esi + 0x22]
shl edx, 8
or eax, edx
mov dword [esp + 0x580], eax
mov eax, dword [esi + 0x24]
bswap eax
mov dword [esp + 0x584], eax
mov eax, dword [esi + 0x28]
bswap eax
mov dword [esp + 0x588], eax
mov eax, dword [esi + 0x2c]
bswap eax
mov dword [esp + 0x58c], eax
mov eax, dword [esi + 0x30]
bswap eax
mov dword [esp + 0x590], eax
mov eax, dword [esi + 0x34]
bswap eax
mov dword [esp + 0x594], eax
mov eax, dword [esi + 0x38]
bswap eax
mov dword [esp + 0x598], eax
mov eax, dword [esi + 0x3c]
bswap eax
mov dword [esp + 0x59c], eax
mov eax, dword [esi + 0x40]
bswap eax
mov dword [esp + 0x5a0], eax
mov eax, dword [esi + 0x44]
bswap eax
mov dword [esp + 0x5a4], eax
mov eax, esi
add esi, 0x48
rep movsd dword es:[edi], dword [esi]
mov esi, eax
lea edx, [esi + 0x84e]
mov eax, dword [eax + 0x848]
bswap eax
mov dword [esp + 0xda8], eax
movzx eax, byte [esi + 0x84c]
mov dword [esp + 0x4c], edx
shl eax, 8
mov ecx, eax
movzx eax, byte [esi + 0x84d]
xor esi, esi
or eax, ecx
mov word [esp + 0xdac], ax
mov eax, edx
mov dword [esp + 0x3c], ebx
lea edx, [eax + 1]
mov ecx, eax
mov dword [esp + 0x4c], edx
movzx ebx, byte [eax]
shl ebx, 0x18
mov edx, ebx
lea ebx, [eax + 2]
mov dword [esp + 0x4c], ebx
movzx ebx, byte [eax + 1]
shl ebx, 0x10
or ebx, edx
lea edx, [eax + 3]
add eax, 4
mov dword [esp + 0x4c], edx
movzx edx, byte [eax - 2]
mov dword [esp + 0x4c], eax
movzx edi, byte [ecx + 3]
shl edx, 8
or ebx, edi
mov edi, dword [esp + 0x18]
or ebx, edx
mov dword [edi + esi*4 + 0x958], ebx
add esi, 1
cmp esi, 3
jne 0x40709f
movzx eax, byte [ecx + 4]
mov ebx, dword [esp + 0x3c]
lea edi, [esp + 0xf08]
shl eax, 0x18
mov edx, eax
movzx eax, byte [ecx + 5]
shl eax, 0x10
or eax, edx
movzx edx, byte [ecx + 7]
or eax, edx
movzx edx, byte [ecx + 6]
shl edx, 8
or eax, edx
mov dword [esp + 0xdbc], eax
movzx eax, word [ecx + 8]
rol ax, 8
mov word [esp + 0xdc0], ax
mov eax, dword [ecx + 0xa]
bswap eax
mov dword [esp + 0xdc4], eax
mov eax, dword [ecx + 0xe]
bswap eax
mov dword [esp + 0xdc8], eax
movzx eax, word [ecx + 0x12]
rol ax, 8
mov word [esp + 0xdcc], ax
movzx eax, byte [ecx + 0x14]
shl eax, 8
mov edx, eax
lea eax, [ecx + 0x16]
mov dword [esp + 0x4c], eax
movzx eax, byte [ecx + 0x15]
lea ecx, [esp + 0xdd2]
mov dword [esp], 0x20
or eax, edx
lea edx, [esp + 0xdd0]
mov word [esp + 0xdce], ax
lea eax, [esp + 0x4c]
call sym._string_
mov eax, dword [esp + 0x4c]
lea edx, [eax + 1]
lea ecx, [eax + 2]
mov dword [esp + 0x4c], edx
movzx edx, byte [eax]
lea esi, [eax + 4]
mov dword [esp + 0x4c], ecx
movzx ecx, byte [eax + 1]
shl edx, 0x18
shl ecx, 0x10
or edx, ecx
lea ecx, [eax + 3]
mov dword [esp + 0x4c], ecx
movzx ecx, byte [eax + 2]
mov dword [esp + 0x4c], esi
movzx esi, byte [eax + 3]
shl ecx, 8
or edx, esi
lea esi, [eax + 0x10]
or edx, ecx
mov dword [esp + 0xdf4], edx
mov edx, dword [eax + 4]
bswap edx
mov dword [esp + 0xdf8], edx
mov edx, dword [eax + 8]
bswap edx
mov dword [esp + 0xdfc], edx
movzx edx, byte [eax + 0xc]
movzx ecx, byte [eax + 0xd]
shl edx, 0x18
shl ecx, 0x10
or edx, ecx
movzx ecx, byte [eax + 0xe]
mov dword [esp + 0x4c], esi
movzx eax, byte [eax + 0xf]
mov dword [esp], 0x100
shl ecx, 8
or eax, edx
lea edx, [esp + 0xe04]
or eax, ecx
lea ecx, [esp + 0xe06]
mov dword [esp + 0xe00], eax
lea eax, [esp + 0x4c]
call sym._string_
mov eax, dword [esp + 0x4c]
mov esi, dword [esp + 0x18]
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], eax
add esi, 0xae8
add eax, 1
lea esi, [esi]
nop
mov dword [esp + 0x4c], eax
movzx ecx, byte [eax - 1]
lea ebx, [eax + 3]
add edi, 4
shl ecx, 0x18
mov edx, ecx
lea ecx, [eax + 1]
mov dword [esp + 0x4c], ecx
movzx ecx, byte [eax]
shl ecx, 0x10
or ecx, edx
lea edx, [eax + 2]
add eax, 4
mov dword [esp + 0x4c], edx
movzx edx, byte [eax - 3]
mov dword [esp + 0x4c], ebx
movzx ebx, byte [eax - 2]
shl edx, 8
or ecx, ebx
or edx, ecx
mov dword [edi - 4], edx
cmp edi, esi
jne 0x407260
mov esi, dword [esp + 0x3c]
lea ecx, [esp + 0xf44]
mov ebx, dword [esp + 0x38]
movzx eax, byte [esi + 0x38]
shl eax, 8
mov edx, eax
lea eax, [esi + 0x3a]
mov dword [esp + 0x4c], eax
movzx eax, byte [esi + 0x39]
mov dword [esp], 0x20
or eax, edx
lea edx, [esp + 0xf42]
mov word [esp + 0xf40], ax
lea eax, [esp + 0x4c]
call sym._string_
mov edi, dword [esp + 0x4c]
lea eax, [edi + 1]
lea esi, [edi + 4]
mov dword [esp + 0x4c], eax
movzx eax, byte [edi]
shl eax, 0x18
mov edx, eax
lea eax, [edi + 2]
mov dword [esp + 0x4c], eax
movzx eax, byte [edi + 1]
shl eax, 0x10
or eax, edx
lea edx, [edi + 3]
mov dword [esp + 0x4c], edx
movzx edx, byte [edi + 2]
mov dword [esp + 0x4c], esi
movzx esi, byte [edi + 3]
shl edx, 8
or eax, esi
mov esi, edi
or eax, edx
add esi, 0x10
mov dword [esp + 0xf64], eax
mov eax, dword [edi + 4]
bswap eax
mov dword [esp + 0xf68], eax
mov eax, dword [edi + 8]
bswap eax
mov dword [esp + 0xf6c], eax
movzx eax, byte [edi + 0xc]
movzx edx, byte [edi + 0xd]
shl eax, 0x18
shl edx, 0x10
or eax, edx
movzx edx, byte [edi + 0xe]
mov dword [esp + 0x4c], esi
movzx ecx, byte [edi + 0xf]
shl edx, 8
or eax, ecx
xor ecx, ecx
or eax, edx
mov dword [esp + 0xf70], eax
mov eax, esi
lea edx, [eax + 1]
mov edi, eax
mov dword [esp + 0x4c], edx
movzx esi, byte [eax]
shl esi, 0x18
mov edx, esi
lea esi, [eax + 2]
mov dword [esp + 0x4c], esi
movzx esi, byte [eax + 1]
shl esi, 0x10
or esi, edx
lea edx, [eax + 3]
add eax, 4
mov dword [esp + 0x4c], edx
movzx edx, byte [eax - 2]
mov dword [esp + 0x4c], eax
movzx edi, byte [edi + 3]
shl edx, 8
or esi, edi
or edx, esi
mov esi, dword [esp + 0x18]
mov dword [esi + ecx*4 + 0xb1c], edx
add ecx, 1
cmp ecx, 3
jne 0x40737c
add esi, 0x18
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], esi
mov esi, dword [esp + 0x34]
lea edx, [eax + 1]
lea edi, [eax + 4]
mov ecx, eax
add esi, 8
mov dword [esp + 0x4c], edx
movzx ebx, byte [eax]
shl ebx, 0x18
mov edx, ebx
lea ebx, [eax + 2]
mov dword [esp + 0x4c], ebx
movzx ebx, byte [eax + 1]
shl ebx, 0x10
or ebx, edx
lea edx, [eax + 3]
add eax, 8
mov dword [esp + 0x4c], edx
movzx edx, byte [eax - 6]
mov dword [esp + 0x4c], edi
movzx edi, byte [eax - 5]
shl edx, 8
or ebx, edi
or ebx, edx
mov dword [esi + 0xb20], ebx
movzx ebx, byte [eax - 4]
shl ebx, 0x18
mov edx, ebx
movzx ebx, byte [eax - 3]
shl ebx, 0x10
or ebx, edx
movzx edx, byte [eax - 2]
mov dword [esp + 0x4c], eax
movzx edi, byte [ecx + 7]
shl edx, 8
or ebx, edi
or ebx, edx
mov dword [esi + 0xb24], ebx
cmp esi, dword [esp + 0x3c]
jne 0x4073dc
movzx eax, byte [ecx + 8]
mov ebx, dword [esp + 0x38]
shl eax, 0x18
mov edx, eax
movzx eax, byte [ecx + 9]
shl eax, 0x10
or eax, edx
movzx edx, byte [ecx + 0xb]
or eax, edx
movzx edx, byte [ecx + 0xa]
shl edx, 8
or eax, edx
mov dword [esp + 0xf98], eax
mov eax, dword [ecx + 0xc]
bswap eax
mov dword [esp + 0xf9c], eax
mov eax, dword [ecx + 0x10]
bswap eax
mov dword [esp + 0xfa0], eax
movzx eax, word [ecx + 0x14]
rol ax, 8
mov word [esp + 0xfa4], ax
mov eax, dword [ecx + 0x16]
bswap eax
mov dword [esp + 0xfa8], eax
mov eax, dword [ecx + 0x1a]
bswap eax
mov dword [esp + 0xfac], eax
mov eax, dword [ecx + 0x1e]
bswap eax
mov dword [esp + 0xfb0], eax
mov eax, dword [ecx + 0x22]
mov dword [esp + 0xfb8], 0
mov dword [esp + 0xfbc], 0
bswap eax
mov dword [esp + 0xfb4], eax
jmp 0x405ac4
movzx eax, word [esp + 0x514]
mov dword [esp + 0xfc0], esi
imul eax, eax, 0x4c
mov dword [esp], eax
call sym._malloc
mov dword [esp + 0x3c], 0
mov dword [esp + 0xfb8], eax
mov dword [esp + 0x34], ebx
movzx eax, word [esp + 0x514]
cmp dword [esp + 0x3c], eax
jge 0x40765d
imul edi, dword [esp + 0x3c], 0x4c
mov eax, dword [esp + 0x28]
mov dword [esp], 0x20
mov edx, dword [esp + 0xfb8]
add edx, edi
lea ecx, [edx + 2]
call sym._string_
mov esi, dword [esp + 0xfc0]
add edi, dword [esp + 0xfb8]
lea ebx, [edi + 0x22]
lea ecx, [esi + 0xa]
mov dword [esp + 0x38], esi
mov eax, esi
mov esi, ecx
lea edx, [eax + 1]
add eax, 2
add ebx, 2
mov dword [esp + 0xfc0], edx
movzx ecx, byte [eax - 2]
mov dword [esp + 0xfc0], eax
movzx edx, byte [eax - 1]
shl ecx, 8
or edx, ecx
mov word [ebx - 2], dx
cmp eax, esi
jne 0x407572
mov esi, dword [esp + 0x38]
lea eax, [esi + 0xb]
mov dword [esp + 0xfc0], eax
movzx eax, byte [esi + 0xa]
shl eax, 0x18
mov edx, eax
lea eax, [esi + 0xc]
mov dword [esp + 0xfc0], eax
movzx eax, byte [esi + 0xb]
shl eax, 0x10
or eax, edx
movzx edx, byte [esi + 0xd]
or eax, edx
movzx edx, byte [esi + 0xc]
shl edx, 8
or eax, edx
mov dword [edi + 0x2c], eax
mov eax, dword [esi + 0xe]
bswap eax
mov dword [edi + 0x30], eax
mov eax, dword [esi + 0x12]
bswap eax
mov dword [edi + 0x34], eax
mov eax, dword [esi + 0x16]
bswap eax
mov dword [edi + 0x38], eax
mov eax, dword [esi + 0x1a]
bswap eax
mov dword [edi + 0x3c], eax
movzx edx, byte [esi + 0x1e]
lea eax, [esi + 0x22]
mov ecx, edx
movzx edx, byte [esi + 0x1f]
shl ecx, 0x18
shl edx, 0x10
or edx, ecx
movzx ecx, byte [esi + 0x21]
or edx, ecx
movzx ecx, byte [esi + 0x20]
shl ecx, 8
or edx, ecx
mov dword [edi + 0x40], edx
xor edx, edx
lea ecx, [eax + 1]
add eax, 2
mov dword [esp + 0xfc0], ecx
movzx ecx, byte [eax - 2]
mov dword [esp + 0xfc0], eax
mov ebx, ecx
movzx ecx, byte [eax - 1]
shl ebx, 8
or ecx, ebx
mov word [edi + edx*2 + 0x44], cx
add edx, 1
cmp edx, 3
jne 0x407623
add dword [esp + 0x3c], 1
jmp 0x407523
mov ebx, dword [esp + 0x34]
jmp 0x405ade
mov dword [esp], 2
call dword [0x40801c]
mov esi, dword [esp + 0x30]
mov dword [esp + 4], str.System_Program_start_offset_is__X__but_image_is_only__X_bytes_n
mov dword [esp], eax
mov dword [esp + 0xc], esi
mov esi, dword [esp + 0x20]
mov dword [esp + 8], esi
call sym._fprintf
mov eax, 1
jmp 0x406522
mov edx, edi
mov eax, ebx
call sym._defer_disasm
jmp 0x4059d8
movzx eax, word [edi + 0x30]
mov ecx, 0xff0000
mov edx, str.start
movzx esi, word [edi + 0x34]
mov word [esp + 0x38], ax
movzx eax, word [edi + 0x32]
mov word [esp + 0x28], ax
movzx eax, word [edi + 0x36]
mov word [esp + 0x24], ax
lea eax, [edi + 0x200]
mov dword [esp + 0x34], eax
mov eax, ebx
call sym._add_label
cmp dword [esp + 0x3c], 0
je 0x4077f1
cmp byte [esp + 0x18], 0
je 0x4077f1
movzx eax, word [edi + 0x20a]
cmp ax, 0x57a
je 0x4077e7
cmp ax, 0x564
mov ecx, 0xff056e
mov eax, 0xff0156
cmovne ecx, eax
mov edx, str.user_start
mov eax, ebx
shl esi, 0x10
call sym._add_label
mov edx, dword [esp + 0x38]
movzx eax, word [esp + 0x24]
mov dword [esp + 0x38], 0xff0000
movzx ecx, word [esp + 0x28]
shl edx, 0x10
or eax, esi
mov esi, dword [esp + 0x30]
or edx, ecx
add eax, edx
cmp eax, esi
cmova eax, esi
add eax, 0xfefe00
mov dword [esp + 0x3c], eax
jmp 0x405c8e
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], 0x40948b
mov eax, dword [eax + 4]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov esi, eax
mov dword [esp], eax
mov dword [esp + 0x20], eax
call sub.msvcrt.dll_fseek
mov dword [esp], esi
call sub.msvcrt.dll_ftell
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], esi
mov dword [esp + 0x1c], eax
call sub.msvcrt.dll_fseek
mov eax, dword [ebx + 8]
mov byte [esp + 0x2d], 0
mov byte [esp + 0x24], 0
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], 0
mov byte [esp + 0x2f], 0
mov byte [esp + 0x2e], 0
mov byte [esp + 0x18], 0
jmp 0x4054d0
mov ecx, 0xff0584
jmp 0x40771d
mov edx, 0xff0000
mov eax, ebx
call sym._defer_disasm
jmp 0x4076fb
mov ebx, dword [edi]
mov dword [esp], 2
call dword [0x40801c]
mov dword [esp + 4], str.Failed_to_open__s_for_reading_n
mov dword [esp + 8], ebx
mov dword [esp], eax
call sym._fprintf
mov dword [esp], 1
call sym._exit
mov dword [esp], 2
call dword [0x40801c]
mov dword [esp + 8], 0x22
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str._f_must_be_followed_by_a_filename_n
call sym._fwrite
mov dword [esp], 1
call sym._exit
mov dword [esp], 2
call dword [0x40801c]
mov dword [esp + 8], 0x21
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str._s_must_be_followed_by_an_offset_n
call sym._fwrite
mov dword [esp], 1
call sym._exit
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop