Function at 0x4014c7
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
and esp, 0xfffffff0
sub esp, 0x1b0
call sym.___main
mov dword [esp + 0x190], 0
cmp dword [ebp + 8], 1
jg 0x401504
mov dword [esp], str.Usage:_segdtrailer_segd_input_file__number_of_guns_
call sym._puts
mov dword [esp], 0
call sym._exit
cmp dword [ebp + 8], 2
jle 0x401583
mov dword [esp + 0x1ac], 2
jmp 0x401577
mov eax, dword [esp + 0x1ac]
lea edx, [eax*4]
mov eax, dword [ebp + 0xc]
add eax, edx
mov eax, dword [eax]
mov dword [esp + 8], 8
mov dword [esp + 4], str.trailer
mov dword [esp], eax
call sym._strncmp
test eax, eax
jne 0x40156f
mov eax, dword [esp + 0x1ac]
lea edx, [eax*4]
mov eax, dword [ebp + 0xc]
add eax, edx
mov eax, dword [eax]
add eax, 8
mov dword [esp], eax
call sym._atoi
mov dword [esp + 0x190], eax
add dword [esp + 0x1ac], 1
mov eax, dword [esp + 0x1ac]
cmp eax, dword [ebp + 8]
jl 0x401517
mov eax, dword [esp + 0x190]
test eax, eax
je 0x4015a5
mov eax, dword [esp + 0x190]
mov dword [esp + 4], eax
mov dword [esp], str.Trailer_Length_d_n
call sym._printf
mov eax, dword [ebp + 0xc]
add eax, 4
mov eax, dword [eax]
mov dword [esp + 4], 0x406094
mov dword [esp], eax
call sym._fopen
mov dword [esp + 0x19c], eax
cmp dword [esp + 0x19c], 0
jne 0x4015e6
mov dword [esp], str.Invalid_input_file_name
call sym._puts
mov dword [esp], 0
call sym._exit
mov eax, dword [esp + 0x19c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0x20
lea eax, [esp + 0x140]
mov dword [esp], eax
call sym._fread
mov eax, dword [esp + 0x19c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0x20
lea eax, [esp + 0x120]
mov dword [esp], eax
call sym._fread
mov eax, dword [esp + 0x19c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0x20
lea eax, [esp + 0x100]
mov dword [esp], eax
call sym._fread
mov eax, dword [esp + 0x19c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0x20
lea eax, [esp + 0xe0]
mov dword [esp], eax
call sym._fread
movzx eax, byte [esp + 0x15c]
cmp al, 2
jne 0x4016c4
mov eax, dword [esp + 0x19c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0x20
lea eax, [esp + 0xc0]
mov dword [esp], eax
call sym._fread
lea eax, [esp + 0x68]
mov dword [esp + 8], eax
mov dword [esp + 4], 4
lea eax, [esp + 0x140]
mov dword [esp], eax
call sym._BCDToBin
lea eax, [esp + 0x18c]
mov dword [esp + 8], eax
mov dword [esp + 4], 2
lea eax, [esp + 0x140]
add eax, 0x1e
mov dword [esp], eax
call sym._BCDToBin
mov eax, dword [esp + 0x190]
test eax, eax
jne 0x401738
lea eax, [esp + 0x190]
mov dword [esp + 8], eax
mov dword [esp + 4], 4
lea eax, [esp + 0x120]
add eax, 0xc
mov dword [esp], eax
call sym._BCDToBin
mov ecx, dword [esp + 0x190]
mov edx, dword [esp + 0x18c]
mov eax, dword [esp + 0x68]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], str.File_Number:__d_Extended_Hdr:_d_Trailer_Length:_d_n
call sym._printf
mov dword [esp + 0x1ac], 0
jmp 0x4017a1
mov eax, dword [esp + 0x19c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0x20
lea eax, [esp + 0x160]
mov dword [esp], eax
call sym._fread
add dword [esp + 0x1ac], 1
mov eax, dword [esp + 0x18c]
cmp dword [esp + 0x1ac], eax
jl 0x40176f
lea eax, [esp + 0x188]
mov dword [esp + 8], eax
mov dword [esp + 4], 2
lea eax, [esp + 0xe0]
add eax, 4
mov dword [esp], eax
call sym._CharToBin
mov eax, dword [esp + 0x188]
shl eax, 2
mov dword [esp + 0x188], eax
lea eax, [esp + 0x184]
mov dword [esp + 8], eax
mov dword [esp + 4], 4
lea eax, [esp + 0xe0]
add eax, 8
mov dword [esp], eax
call sym._BCDToBin
mov edx, dword [esp + 0x188]
mov eax, dword [esp + 0x184]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], str.Scan_1_NumChans:_d_Numsamples:_d_n
call sym._printf
mov dword [esp + 0x1ac], 0
jmp 0x4018ca
mov eax, dword [esp + 0x19c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0x14
lea eax, [esp + 0xac]
mov dword [esp], eax
call sym._fread
mov dword [esp + 0x194], 0
jmp 0x4018b0
mov eax, dword [esp + 0x19c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 4
lea eax, [esp + 0x180]
mov dword [esp], eax
call sym._fread
mov eax, dword [esp + 0x194]
add eax, 1
mov dword [esp + 0x194], eax
mov edx, dword [esp + 0x194]
mov eax, dword [esp + 0x188]
cmp edx, eax
jl 0x401875
add dword [esp + 0x1ac], 1
mov eax, dword [esp + 0x184]
cmp dword [esp + 0x1ac], eax
jl 0x40183e
movzx eax, byte [esp + 0x15c]
cmp al, 2
jne 0x401a1b
lea eax, [esp + 0x188]
mov dword [esp + 8], eax
mov dword [esp + 4], 2
lea eax, [esp + 0xc0]
add eax, 4
mov dword [esp], eax
call sym._CharToBin
mov eax, dword [esp + 0x188]
shl eax, 2
mov dword [esp + 0x188], eax
lea eax, [esp + 0x184]
mov dword [esp + 8], eax
mov dword [esp + 4], 4
lea eax, [esp + 0xc0]
add eax, 8
mov dword [esp], eax
call sym._BCDToBin
mov edx, dword [esp + 0x188]
mov eax, dword [esp + 0x184]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], str.Scan_2_NumChans:_d_Numsamples:_d_n
call sym._printf
mov dword [esp + 0x1ac], 0
jmp 0x401a07
mov eax, dword [esp + 0x19c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0x14
lea eax, [esp + 0xac]
mov dword [esp], eax
call sym._fread
mov dword [esp + 0x194], 0
jmp 0x4019ed
mov eax, dword [esp + 0x19c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 4
lea eax, [esp + 0x180]
mov dword [esp], eax
call sym._fread
mov eax, dword [esp + 0x194]
add eax, 1
mov dword [esp + 0x194], eax
mov edx, dword [esp + 0x194]
mov eax, dword [esp + 0x188]
cmp edx, eax
jl 0x4019b2
add dword [esp + 0x1ac], 1
mov eax, dword [esp + 0x184]
cmp dword [esp + 0x1ac], eax
jl 0x40197b
mov eax, dword [esp + 0x19c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0x20
lea eax, [esp + 0x8c]
mov dword [esp], eax
call sym._fread
lea eax, [esp + 0x194]
mov dword [esp + 8], eax
mov dword [esp + 4], 2
lea eax, [esp + 0x8c]
add eax, 0xc
mov dword [esp], eax
call sym._CharToBin
mov edi, eax
lea eax, [esp + 0x194]
mov dword [esp + 8], eax
mov dword [esp + 4], 2
lea eax, [esp + 0x8c]
add eax, 8
mov dword [esp], eax
call sym._CharToBin
mov esi, eax
lea eax, [esp + 0x194]
mov dword [esp + 8], eax
mov dword [esp + 4], 2
lea eax, [esp + 0x8c]
add eax, 6
mov dword [esp], eax
call sym._CharToBin
mov ebx, eax
lea eax, [esp + 0x194]
mov dword [esp + 8], eax
mov dword [esp + 4], 2
lea eax, [esp + 0x8c]
add eax, 4
mov dword [esp], eax
call sym._CharToBin
movzx edx, byte [esp + 0x8e]
movzx edx, dl
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], str._nSrc:_d_Man:_d_Vol:_d_Sprd:_d_Baro:_d_n
call sym._printf
mov dword [esp], str._nString__Cluster__Gun__Mode__AutoFire__Gun_SN__FireTime__Delay__Depth__Pressure__FillTime__Volume__Hyd_Amp__Hyd_Time__Hyd_Sens_SN
call sym._puts
mov dword [esp + 0x1ac], 0
jmp 0x401dc6
mov eax, dword [esp + 0x19c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0x20
lea eax, [esp + 0x6c]
mov dword [esp], eax
call sym._fread
lea eax, [esp + 0x194]
mov dword [esp + 8], eax
mov dword [esp + 4], 4
lea eax, [esp + 0x6c]
add eax, 0x1c
mov dword [esp], eax
call sym._CharToBin
mov dword [esp + 0x198], eax
fild dword [esp + 0x198]
fstp qword [esp + 0x1a0]
cmp dword [esp + 0x198], 0
je 0x401b9e
fld1
fdiv qword [esp + 0x1a0]
fstp qword [esp + 0x1a0]
lea eax, [esp + 0x194]
mov dword [esp + 8], eax
mov dword [esp + 4], 2
lea eax, [esp + 0x6c]
add eax, 0x1a
mov dword [esp], eax
call sym._CharToBin
mov ebx, eax
lea eax, [esp + 0x194]
mov dword [esp + 8], eax
mov dword [esp + 4], 2
lea eax, [esp + 0x6c]
add eax, 0x18
mov dword [esp], eax
call sym._CharToBin
mov dword [esp + 0x5c], eax
lea eax, [esp + 0x194]
mov dword [esp + 8], eax
mov dword [esp + 4], 2
lea eax, [esp + 0x6c]
add eax, 0x16
mov dword [esp], eax
call sym._CharToBin
mov dword [esp + 0x58], eax
lea eax, [esp + 0x194]
mov dword [esp + 8], eax
mov dword [esp + 4], 2
lea eax, [esp + 0x6c]
add eax, 0x14
mov dword [esp], eax
call sym._CharToBin
mov dword [esp + 0x54], eax
lea eax, [esp + 0x194]
mov dword [esp + 8], eax
mov dword [esp + 4], 2
lea eax, [esp + 0x6c]
add eax, 0x12
mov dword [esp], eax
call sym._CharToBin
mov dword [esp + 0x50], eax
lea eax, [esp + 0x194]
mov dword [esp + 8], eax
mov dword [esp + 4], 2
lea eax, [esp + 0x6c]
add eax, 0x10
mov dword [esp], eax
call sym._CharToBin
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x194]
mov dword [esp + 8], eax
mov dword [esp + 4], 2
lea eax, [esp + 0x6c]
add eax, 0xe
mov dword [esp], eax
call sym._CharToBin
mov dword [esp + 0x48], eax
lea eax, [esp + 0x194]
mov dword [esp + 8], eax
mov dword [esp + 4], 2
lea eax, [esp + 0x6c]
add eax, 0xc
mov dword [esp], eax
call sym._CharToBin
mov dword [esp + 0x44], eax
lea eax, [esp + 0x194]
mov dword [esp + 8], eax
mov dword [esp + 4], 4
lea eax, [esp + 0x6c]
add eax, 6
mov dword [esp], eax
call sym._CharToBin
mov edi, eax
movzx eax, byte [esp + 0x77]
movzx esi, al
movzx eax, byte [esp + 0x71]
movzx ecx, al
mov dword [esp + 0x40], ecx
movzx eax, byte [esp + 0x70]
movzx ecx, al
movzx eax, byte [esp + 0x6f]
movzx edx, al
movzx eax, byte [esp + 0x6e]
movzx eax, al
mov dword [esp + 0x38], ebx
mov ebx, dword [esp + 0x5c]
mov dword [esp + 0x34], ebx
mov ebx, dword [esp + 0x58]
mov dword [esp + 0x30], ebx
mov ebx, dword [esp + 0x54]
mov dword [esp + 0x2c], ebx
mov ebx, dword [esp + 0x50]
mov dword [esp + 0x28], ebx
mov ebx, dword [esp + 0x4c]
mov dword [esp + 0x24], ebx
mov ebx, dword [esp + 0x48]
mov dword [esp + 0x20], ebx
mov ebx, dword [esp + 0x44]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], esi
mov esi, dword [esp + 0x40]
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], str._d___d___d___c___c___5d___03d___03d___03d___03d___03d___03d___04d___03d_
call sym._printf
mov eax, dword [esp + 0x1ac]
and eax, 1
test eax, eax
je 0x401da7
mov eax, dword [esp + 0x198]
mov dword [esp + 4], eax
mov dword [esp], 0x406222
call sym._printf
jmp 0x401dbe
fld qword [esp + 0x1a0]
fstp qword [esp + 4]
mov dword [esp], 0x406226
call sym._printf
add dword [esp + 0x1ac], 1
mov eax, dword [esp + 0x190]
sub eax, 1
cmp dword [esp + 0x1ac], eax
jl 0x401b26
mov eax, dword [esp + 0x19c]
mov dword [esp], eax
call sym._fclose
mov eax, 0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret