Function at 0x401264
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
call sym.___main
mov dword [ebp - 4], 0x100
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x50], 0
cmp dword [ebp + 8], 3
je 0x4012b0
add esp, 0xfffffff8
push 0x4011f0
mov eax, dword [sym.imp.crtdll.dll__iob]
add eax, 0x40
push eax
call sym._fprintf
add esp, 0x10
add esp, 0xfffffff4
push 1
call sym._exit
add esp, 0x10
call sym._OSTN02_table
mov eax, eax
mov dword [ebp - 0x54], eax
add esp, 0xfffffff4
mov eax, dword [ebp - 4]
push eax
call sym._malloc
add esp, 0x10
mov eax, eax
mov dword [ebp - 8], eax
add esp, 0xfffffff8
push 0x40121d
mov eax, dword [ebp + 0xc]
add eax, 4
mov edx, dword [eax]
push edx
call sym._fopen
add esp, 0x10
mov eax, eax
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x401321
add esp, 0xfffffffc
mov eax, dword [ebp + 0xc]
add eax, 4
mov edx, dword [eax]
push edx
push 0x401230
mov eax, dword [sym.imp.crtdll.dll__iob]
add eax, 0x40
push eax
call sym._fprintf
add esp, 0x10
add esp, 0xfffffff4
push 1
call sym._exit
add esp, 0x10
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0xffffffff
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
lea esi, [esi]
add esp, 0xfffffffc
mov eax, dword [ebp - 0x4c]
push eax
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 8]
push eax
call sym._fgets
add esp, 0x10
mov eax, eax
test eax, eax
jne 0x401362
jmp 0x401461
cmp dword [ebp - 0x18], 0
jge 0x4013b1
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x401252
mov eax, dword [ebp - 8]
push eax
call sym._sscanf
add esp, 0x10
mov eax, dword [ebp - 0x14]
add dword [ebp - 0xc], eax
add esp, 0xfffffff8
mov edx, dword [ebp - 0xc]
mov eax, edx
add eax, eax
add eax, edx
lea edx, [eax*4]
push edx
mov eax, dword [ebp - 0x50]
push eax
call sym._realloc
add esp, 0x10
mov eax, eax
mov dword [ebp - 0x50], eax
jmp 0x40144a
add esp, 0xfffffff4
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x30]
push eax
push 0x401258
mov eax, dword [ebp - 8]
push eax
call sym._sscanf
add esp, 0x20
add esp, 0xfffffffc
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x38]
push eax
fld qword [ebp - 0x30]
sub esp, 8
fstp qword [esp]
fld qword [ebp - 0x28]
sub esp, 8
fstp qword [esp]
mov eax, dword [ebp - 0x54]
push eax
call sym._WGS842OS
add esp, 0x20
mov edx, dword [ebp - 0x10]
mov eax, edx
add eax, eax
add eax, edx
lea edx, [eax*4]
mov eax, dword [ebp - 0x50]
fld qword [ebp - 0x40]
fstp dword [eax + edx]
mov edx, dword [ebp - 0x10]
mov eax, edx
add eax, eax
add eax, edx
lea edx, [eax*4]
mov eax, dword [ebp - 0x50]
fld qword [ebp - 0x38]
fstp dword [eax + edx + 4]
mov edx, dword [ebp - 0x10]
mov eax, edx
add eax, eax
add eax, edx
lea edx, [eax*4]
mov eax, dword [ebp - 0x50]
fld qword [ebp - 0x48]
fstp dword [eax + edx + 8]
inc dword [ebp - 0x10]
inc dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x14]
jl 0x40145c
mov dword [ebp - 0x18], 0xffffffff
jmp 0x401340
add esp, 0xfffffffc
mov eax, dword [ebp - 0x50]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp + 0xc]
add eax, 8
mov edx, dword [eax]
push edx
call sym._write_plain
add esp, 0x10
add esp, 0xfffffff4
mov eax, dword [ebp - 0x50]
push eax
call sym._free
add esp, 0x10
add esp, 0xfffffff4
mov eax, dword [ebp - 0x54]
push eax
call sym._free
add esp, 0x10
add esp, 0xfffffff4
mov eax, dword [ebp - 0x4c]
push eax
call sym._fclose
add esp, 0x10
add esp, 0xfffffff4
mov eax, dword [ebp - 8]
push eax
call sym._free
add esp, 0x10
xor eax, eax
jmp 0x4014c0
leave
ret