Function at 0x4059a0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41d301
mov eax, dword fs:[0]
push eax
sub esp, 0xa30
mov eax, dword [0x427010]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x964], edi
mov dword [ebp - 0xa3c], 0
mov dword [ebp - 0xa38], 0
mov dword [ebp - 0xa34], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0xa30], 0
mov dword [ebp - 0xa2c], 0
mov dword [ebp - 0xa28], 0
mov dword [ebp - 0xa24], 0
mov dword [ebp - 0xa20], 0
mov dword [ebp - 0xa1c], 0
lea ecx, [ebp - 0xa18]
mov byte [ebp - 4], 2
call fcn.00401e30
lea ecx, [ebp - 0x9f8]
mov byte [ebp - 4], 3
call fcn.00401e30
xor eax, eax
mov dword [ebp - 0x9d8], 0
mov dword [ebp - 0x9d4], 0
mov dword [ebp - 0x9d0], 0
mov dword [ebp - 0x9cc], 0
mov dword [ebp - 0x9c8], 0
mov dword [ebp - 0x9c4], 0x1000000
mov dword [ebp - 0x9c0], 0xffffffff
mov dword [ebp - 0x9bc], eax
mov dword [ebp - 0x9b8], 0xffffffff
mov dword [ebp - 0x9b4], 0xffffffff
mov dword [ebp - 0x9b0], eax
mov dword [ebp - 0x9ac], eax
lea ecx, [ebp - 0x948]
mov dword [ebp - 4], 4
call fcn.00402bf0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x70]
push 3
mov dword [ebp - 0x70], 0
push 0x424c90
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0xf
mov byte [ebp - 0x70], 0
call fcn.00407290
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x58]
push 3
mov dword [ebp - 0x58], 0
push 0x424c94
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0xf
mov byte [ebp - 0x58], 0
call fcn.00407290
mov eax, 0x424c98
mov byte [ebp - 4], 7
mov esi, 1
mov dword [ebp - 0x968], eax
mov dword [ebp - 0x954], eax
mov dword [ebp - 0x958], eax
cmp dword [ebp + 8], esi
jle 0x406a53
mov edx, dword [edi + esi*4]
lea ecx, [ebp - 0x28]
xor al, al
mov byte [ebp - 0x94d], al
call fcn.00404be0
mov byte [ebp - 4], 8
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
mov ecx, dword [ebp - 0x28]
cmovae eax, ecx
cmp byte [eax], 0x2d
jne 0x405bb9
cmp edx, 0x10
lea eax, [ebp - 0x28]
cmovae eax, ecx
cmp byte [eax + 1], 0
je 0x405bb9
cmp edx, 0x10
lea eax, [ebp - 0x28]
cmovae eax, ecx
cmp byte [eax + 2], 0
jne 0x405bb9
cmp edx, 0x10
lea eax, [ebp - 0x28]
cmovae eax, ecx
mov al, byte [eax + 1]
mov byte [ebp - 0x94d], al
cmp al, 0x68
je 0x406447
mov eax, dword [ebp + 8]
add eax, 0xfffffffe
cmp esi, eax
jge 0x406418
mov al, byte [ebp - 0x94d]
cmp al, 0x70
jne 0x405d1e
mov edx, dword [edi + esi*4 + 4]
lea ecx, [ebp - 0x40]
inc esi
mov dword [ebp - 0x94c], esi
call fcn.00404be0
mov esi, eax
lea eax, [ebp - 0x28]
cmp eax, esi
je 0x405c59
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x405c25
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x405c1b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406cd0
push edx
push ecx
call fcn.004081dc
add esp, 8
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
movups xmm0, xmmword [esi]
movups xmmword [ebp - 0x28], xmm0
movq xmm0, qword [esi + 0x10]
movq qword [ebp - 0x18], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xf
mov byte [esi], 0
mov edx, dword [ebp - 0x2c]
cmp edx, 0x10
jb 0x405c8d
mov ecx, dword [ebp - 0x40]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x405c83
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406cd0
push edx
push ecx
call fcn.004081dc
add esp, 8
xor edi, edi
cmp dword [ebp - 0x18], edi
jbe 0x406116
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x28]
nop
cmp edx, 0x10
lea eax, [ebp - 0x28]
push 0xa
cmovae eax, ecx
lea ecx, [ebp - 0x960]
push ecx
add eax, edi
push eax
call fcn.0040e18a
add esp, 0xc
lea ecx, [ebp - 0x948]
mov esi, eax
push esi
call fcn.00403040
cmp esi, 0x1fff
ja 0x4069fc
mov edx, dword [ebp - 0x14]
lea eax, [ebp - 0x28]
mov ecx, dword [ebp - 0x28]
cmp edx, 0x10
cmovae eax, ecx
add eax, edi
mov edi, dword [ebp - 0x960]
cmp eax, edi
je 0x4069fc
mov al, byte [edi]
test al, al
je 0x40611c
cmp al, 0x2f
jne 0x4069fc
cmp edx, 0x10
lea eax, [ebp - 0x28]
cmovae eax, ecx
sub edi, eax
inc edi
cmp edi, dword [ebp - 0x18]
jb 0x405ca0
jmp 0x40611c
cmp al, 0x6e
jne 0x405d99
mov edx, dword [edi + esi*4 + 4]
lea ecx, [ebp - 0x40]
inc esi
call fcn.00404be0
cmp dword [eax + 0x14], 0x10
jb 0x405d37
mov eax, dword [eax]
push 0xa
push 0
push eax
call fcn.0040e18a
mov edx, dword [ebp - 0x2c]
add esp, 0xc
mov edi, eax
cmp edx, 0x10
jb 0x405d7a
mov ecx, dword [ebp - 0x40]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x405d70
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406cd0
push edx
push ecx
call fcn.004081dc
add esp, 8
mov edx, dword [ebp - 0x14]
lea eax, [edi + 0x100]
mov ecx, dword [ebp - 0x28]
cmp eax, 0x100ff
mov dword [ebp - 0x948], edi
seta al
jmp 0x40643a
cmp al, 0x74
jne 0x405eee
mov edx, dword [edi + esi*4 + 4]
lea ecx, [ebp - 0x40]
inc esi
mov dword [ebp - 0x94c], esi
call fcn.00404be0
mov esi, eax
lea eax, [ebp - 0x28]
cmp eax, esi
je 0x405e25
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x405df1
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x405de7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406cd0
push edx
push ecx
call fcn.004081dc
add esp, 8
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
movups xmm0, xmmword [esi]
movups xmmword [ebp - 0x28], xmm0
movq xmm0, qword [esi + 0x10]
movq qword [ebp - 0x18], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xf
mov byte [esi], 0
mov edx, dword [ebp - 0x2c]
cmp edx, 0x10
jb 0x405e59
mov ecx, dword [ebp - 0x40]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x405e4f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406cd0
push edx
push ecx
call fcn.004081dc
add esp, 8
xor edi, edi
cmp dword [ebp - 0x18], edi
jbe 0x406116
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x28]
nop word [eax + eax]
cmp edx, 0x10
lea eax, [ebp - 0x28]
push 0xa
cmovae eax, ecx
lea ecx, [ebp - 0x95c]
push ecx
add eax, edi
push eax
call fcn.0040e18a
add esp, 0xc
lea ecx, [ebp - 0x948]
mov esi, eax
push esi
call fcn.004030a0
cmp esi, 0xff
ja 0x4069fc
mov edx, dword [ebp - 0x14]
lea eax, [ebp - 0x28]
mov ecx, dword [ebp - 0x28]
cmp edx, 0x10
cmovae eax, ecx
add eax, edi
mov edi, dword [ebp - 0x95c]
cmp eax, edi
je 0x4069fc
mov al, byte [edi]
test al, al
je 0x40611c
cmp al, 0x2f
jne 0x4069fc
cmp edx, 0x10
lea eax, [ebp - 0x28]
cmovae eax, ecx
sub edi, eax
inc edi
cmp edi, dword [ebp - 0x18]
jb 0x405e70
jmp 0x40611c
cmp al, 0x72
jne 0x406184
mov edx, dword [edi + esi*4 + 4]
lea ecx, [ebp - 0x40]
inc esi
mov dword [ebp - 0x94c], esi
call fcn.00404be0
mov esi, eax
lea eax, [ebp - 0x28]
cmp eax, esi
je 0x405f7a
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x405f46
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x405f3c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406cd0
push edx
push ecx
call fcn.004081dc
add esp, 8
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
movups xmm0, xmmword [esi]
movups xmmword [ebp - 0x28], xmm0
movq xmm0, qword [esi + 0x10]
movq qword [ebp - 0x18], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xf
mov byte [esi], 0
mov edx, dword [ebp - 0x2c]
cmp edx, 0x10
jb 0x405fae
mov ecx, dword [ebp - 0x40]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x405fa4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406cd0
push edx
push ecx
call fcn.004081dc
add esp, 8
mov edi, dword [ebp - 0x14]
lea ecx, [ebp - 0x28]
cmp edi, 0x10
cmovae ecx, dword [ebp - 0x28]
cmp dword [ebp - 0x18], 9
jne 0x406018
mov edx, str.arib_data
mov esi, 5
nop dword [eax + eax]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x405fe1
add ecx, 4
add edx, 4
sub esi, 4
jae 0x405fd0
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x406008
cmp esi, 0xfffffffd
je 0x406004
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x406008
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x406008
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
jne 0x406008
xor eax, eax
jmp 0x40600d
sbb eax, eax
or eax, 1
mov byte [ebp - 0x94d], 1
test eax, eax
je 0x40601f
mov byte [ebp - 0x94d], 0
cmp edi, 0x10
lea ecx, [ebp - 0x28]
cmovae ecx, dword [ebp - 0x28]
cmp dword [ebp - 0x18], 8
jne 0x406082
mov edx, str.arib_epg
mov esi, 4
nop dword [eax]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x406055
add ecx, 4
add edx, 4
sub esi, 4
jae 0x406040
xor eax, eax
jmp 0x40607a
cmp al, byte [edx]
jne 0x406075
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x406075
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x406075
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
jne 0x406075
xor eax, eax
jmp 0x40607a
sbb eax, eax
or eax, 1
test eax, eax
jne 0x406082
mov al, 1
jmp 0x406084
xor al, al
cmp byte [ebp - 0x94d], 0
mov byte [ebp - 0x94e], al
jne 0x40609b
test al, al
je 0x4069fc
push 0x11
lea ecx, [ebp - 0x948]
mov dword [ebp - 0x948], 0xffffffff
call fcn.00403040
push 0x12
lea ecx, [ebp - 0x948]
call fcn.00403040
push 0x14
lea ecx, [ebp - 0x948]
call fcn.00403040
push 0x1f
lea ecx, [ebp - 0x948]
call fcn.00403040
push 0x24
lea ecx, [ebp - 0x948]
call fcn.00403040
cmp byte [ebp - 0x94d], 0
je 0x406169
push 0xb
lea ecx, [ebp - 0x948]
call fcn.004030a0
push 0xc
lea ecx, [ebp - 0x948]
call fcn.004030a0
push 0xd
lea ecx, [ebp - 0x948]
call fcn.004030a0
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x28]
mov esi, dword [ebp - 0x94c]
mov byte [ebp - 4], 7
cmp edx, 0x10
jb 0x406154
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40614a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406cd5
push edx
push ecx
call fcn.004081dc
add esp, 8
inc esi
cmp esi, dword [ebp + 8]
jge 0x406469
mov edi, dword [ebp - 0x964]
jmp 0x405b56
cmp byte [ebp - 0x94e], 0
mov esi, dword [ebp - 0x94c]
je 0x406a02
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x28]
jmp 0x406122
cmp al, 0x69
jne 0x40620e
mov edx, dword [edi + esi*4 + 4]
lea ecx, [ebp - 0x40]
inc esi
call fcn.00404be0
cmp dword [eax + 0x14], 0x10
jb 0x4061a1
mov eax, dword [eax]
push 0xa
push 0
push eax
call fcn.0040e18a
mov edx, dword [ebp - 0x2c]
add esp, 0xc
imul edi, eax, 0x2bf2
cmp edx, 0x10
jb 0x4061e8
mov ecx, dword [ebp - 0x40]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4061de
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406cd0
push edx
push ecx
call fcn.004081dc
add esp, 8
mov edx, dword [ebp - 0x14]
test edi, edi
mov ecx, 0xffffffff
mov eax, edi
cmove eax, ecx
mov ecx, dword [ebp - 0x28]
cmp edi, 0x66ff30
mov dword [ebp - 0x9b4], eax
seta al
jmp 0x40643a
cmp al, 0x62
jne 0x4062df
mov edx, dword [edi + esi*4 + 4]
lea ecx, [ebp - 0x40]
inc esi
mov dword [ebp - 0x94c], esi
call fcn.00404be0
cmp dword [eax + 0x14], 0x10
jb 0x406231
mov eax, dword [eax]
push 0xa
push 0
push eax
call fcn.0040e18a
mov edx, dword [ebp - 0x2c]
mov esi, eax
add esp, 0xc
shl esi, 0xa
cmp edx, 0x10
jb 0x406277
mov ecx, dword [ebp - 0x40]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40626d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406cd0
push edx
push ecx
call fcn.004081dc
add esp, 8
cmp esi, 0x2000
mov dword [ebp - 0x970], esi
lea eax, [ebp - 0x970]
mov dword [ebp - 0x9a8], 0x2000
lea ecx, [ebp - 0x9a8]
mov dword [ebp - 0x978], 0x40000000
cmovae ecx, eax
lea eax, [ebp - 0x978]
cmp dword [ecx], 0x40000000
cmovbe eax, ecx
mov eax, dword [eax]
mov dword [ebp - 0x9c4], eax
lea eax, [esi - 0x2000]
mov esi, dword [ebp - 0x94c]
cmp eax, 0x3fffe000
ja 0x406a02
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x28]
jmp 0x406122
cmp al, 0x63
jne 0x4062f3
mov eax, dword [edi + esi*4 + 4]
inc esi
mov dword [ebp - 0x958], eax
jmp 0x406122
cmp al, 0x73
jne 0x4063aa
mov edx, dword [edi + esi*4 + 4]
lea ecx, [ebp - 0x40]
inc esi
mov dword [ebp - 0x94c], esi
call fcn.00404be0
mov esi, eax
lea eax, [ebp - 0x70]
cmp eax, esi
je 0x40636d
mov edx, dword [ebp - 0x5c]
cmp edx, 0x10
jb 0x40634b
mov ecx, dword [ebp - 0x70]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x406341
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406cd0
push edx
push ecx
call fcn.004081dc
add esp, 8
movups xmm0, xmmword [esi]
movups xmmword [ebp - 0x70], xmm0
movq xmm0, qword [esi + 0x10]
movq qword [ebp - 0x60], xmm0
mov byte [esi], 0
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], 0
mov edx, dword [ebp - 0x2c]
cmp edx, 0x10
jb 0x406116
mov ecx, dword [ebp - 0x40]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40639b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406cd0
push edx
push ecx
call fcn.004081dc
add esp, 8
jmp 0x406116
cmp al, 0x65
jne 0x406122
mov edx, dword [edi + esi*4 + 4]
lea ecx, [ebp - 0x40]
inc esi
mov dword [ebp - 0x94c], esi
call fcn.00404be0
mov esi, eax
lea eax, [ebp - 0x58]
cmp eax, esi
je 0x40636d
mov edx, dword [ebp - 0x44]
cmp edx, 0x10
jb 0x406402
mov ecx, dword [ebp - 0x58]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4063f8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406cd0
push edx
push ecx
call fcn.004081dc
add esp, 8
movups xmm0, xmmword [esi]
movups xmmword [ebp - 0x58], xmm0
movq xmm0, qword [esi + 0x10]
movq qword [ebp - 0x48], xmm0
jmp 0x40635c
mov eax, dword [ebp + 8]
mov edi, dword [edi + esi*4]
dec eax
cmp esi, eax
mov eax, edi
jge 0x40642d
mov dword [ebp - 0x968], eax
jmp 0x406433
mov dword [ebp - 0x954], eax
cmp word [eax], 0
sete al
test al, al
jne 0x406a02
jmp 0x406122
push str.Usage:_psisiarc___p_pids___n_prog_num_or_index___t_stream_types___r_preset___i_interval___b_maxbuf_kbytes___c_chapter___s_pattern___e_pattern__src_dest_n
push 2
call fcn.0040bc57
add esp, 4
push eax
call fcn.00404ba0
add esp, 8
mov esi, 2
jmp 0x406a20
mov eax, dword [ebp - 0x968]
cmp word [eax], 0
je 0x406a53
mov edi, dword [ebp - 0x954]
cmp word [edi], 0
je 0x406a53
mov dword [ebp - 0x98c], 0
mov dword [ebp - 0x988], 0
mov dword [ebp - 0x984], 0
mov eax, dword [ebp - 0x958]
mov byte [ebp - 0x9a4], 0
mov dword [ebp - 0x9a0], 0
mov dword [ebp - 0x99c], 0xffffffff
mov dword [ebp - 0x998], 0xffffffff
mov dword [ebp - 0x994], 0xffffffff
mov dword [ebp - 0x990], 0xffffffff
cmp word [eax], 0
je 0x40665c
push 0x424d94
push eax
call fcn.0040ded5
mov edi, eax
mov dword [ebp - 0x974], fcn.0040be00
add esp, 8
mov dword [ebp - 0x970], edi
mov byte [ebp - 4], 0xa
test edi, edi
je 0x4066cd
sub esp, 0x18
mov byte [ebp - 0x9a4], 1
lea eax, [ebp - 0x58]
mov dword [ebp - 0x964], esp
mov ecx, esp
push eax
call fcn.004071c0
sub esp, 0x18
mov byte [ebp - 4], 0xb
lea eax, [ebp - 0x70]
mov ecx, esp
push eax
call fcn.004071c0
mov edx, edi
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x34]
call fcn.00405040
mov esi, eax
add esp, 0x30
lea eax, [ebp - 0x98c]
cmp eax, esi
je 0x4065fa
mov ecx, dword [ebp - 0x98c]
test ecx, ecx
je 0x4065cc
mov eax, dword [ebp - 0x984]
sub eax, ecx
sar eax, 2
lea edx, [eax*4]
mov eax, ecx
cmp edx, 0x1000
jb 0x4065a4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406cd0
push edx
push ecx
call fcn.004081dc
add esp, 8
mov dword [ebp - 0x98c], 0
mov dword [ebp - 0x988], 0
mov dword [ebp - 0x984], 0
mov eax, dword [esi]
mov dword [ebp - 0x98c], eax
mov eax, dword [esi + 4]
mov dword [ebp - 0x988], eax
mov eax, dword [esi + 8]
mov dword [ebp - 0x984], eax
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov ecx, dword [ebp - 0x34]
test ecx, ecx
je 0x406638
mov eax, dword [ebp - 0x2c]
sub eax, ecx
sar eax, 2
lea edx, [eax*4]
mov eax, ecx
cmp edx, 0x1000
jb 0x40662e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406cd0
push edx
push ecx
call fcn.004081dc
add esp, 8
push dword [ebp - 0x988]
push dword [ebp - 0x98c]
call fcn.004080fc
push edi
mov byte [ebp - 4], 0xd
call fcn.0040be00
mov edi, dword [ebp - 0x954]
add esp, 0xc
xor esi, esi
mov dword [ebp - 0x97c], fcn.0040be00
mov dword [ebp - 0x960], esi
mov dword [ebp - 0x978], esi
xor eax, eax
mov dword [ebp - 0x974], fcn.0040be00
mov dword [ebp - 0x95c], eax
mov dword [ebp - 0x970], eax
mov eax, dword [ebp - 0x968]
mov byte [ebp - 4], 0xf
cmp word [eax], 0x2d
jne 0x4066ef
cmp word [eax + 2], si
jne 0x4066ef
push 0x8000
push esi
call fcn.0040bc57
push eax
call fcn.0040ddf8
add esp, 8
push eax
call fcn.0040db2c
add esp, 8
test eax, eax
jns 0x40671a
mov esi, str.Error:__setmode._n
jmp 0x406785
push str.Error:_cannot_open_chapterfile._n
push 2
call fcn.0040bc57
add esp, 4
push eax
call fcn.00404ba0
add esp, 8
mov esi, 1
jmp 0x40699e
push 0x424dbc
push eax
call fcn.0040ded5
mov esi, eax
add esp, 8
mov dword [ebp - 0x960], esi
mov dword [ebp - 0x978], esi
mov byte [ebp - 4], 0xf
test esi, esi
jne 0x40671a
mov esi, str.Error:_cannot_open_file._n
jmp 0x406785
cmp word [edi], 0x2d
jne 0x40675c
cmp word [edi + 2], 0
jne 0x40675c
push 0x8000
push 1
call fcn.0040bc57
push eax
call fcn.0040ddf8
add esp, 8
push eax
call fcn.0040db2c
add esp, 8
test eax, eax
jns 0x406750
mov esi, str.Error:__setmode._n
jmp 0x406785
push 1
call fcn.0040bc57
add esp, 4
jmp 0x4067a2
push 0x424df4
push edi
call fcn.0040ded5
mov edi, eax
add esp, 8
mov dword [ebp - 0x95c], edi
mov dword [ebp - 0x970], edi
mov byte [ebp - 4], 0xf
test edi, edi
jne 0x4067a0
mov esi, str.Error:_cannot_create_file._n
push 2
call fcn.0040bc57
push esi
push eax
call fcn.00404ba0
add esp, 0xc
mov esi, 1
jmp 0x406970
mov eax, edi
mov dword [ebp - 0x9ac], eax
test esi, esi
je 0x4067b6
mov eax, esi
mov dword [ebp - 0x954], esi
jmp 0x4067c6
push 0
call fcn.0040bc57
add esp, 4
mov dword [ebp - 0x954], eax
xor edi, edi
mov dword [ebp - 0x96c], edi
nop
push eax
mov eax, 0x10000
sub eax, edi
push eax
lea eax, [edi + 0x428ae0]
push 1
push eax
call fcn.0040e3a9
add edi, eax
mov dword [ebp - 0x964], eax
add esp, 0x10
cmp edi, 0x10000
je 0x406804
test eax, eax
mov eax, dword [ebp - 0x954]
jne 0x4067d0
lea eax, [ebp - 0x96c]
mov edx, edi
push eax
call fcn.00407d90
mov esi, dword [ebp - 0x96c]
add esp, 4
mov dword [ebp - 0x958], eax
mov ecx, eax
mov dword [ebp - 0x94c], ecx
test esi, esi
je 0x4068e6
lea ecx, [eax + esi]
cmp ecx, edi
jg 0x4068e0
lea ecx, [ebp - 0xa3c]
mov byte [ebp - 0x94e], 0
mov dword [ebp - 0x34], ecx
lea ecx, [ebp - 0x9a4]
mov dword [ebp - 0x30], ecx
lea ecx, [ebp - 0x94e]
movq xmm0, qword [ebp - 0x34]
mov dword [ebp - 0x8c], ecx
lea ecx, [ebp - 0x98]
mov dword [ebp - 0x98], vtable.std::_Func_impl_no_alloc_class__lambda_e1d3a5cc4b0d6412404c2b3f63da8ca7___void__int__long_long___int64___unsigned_int__unsigned_char_const__.0
movq qword [ebp - 0x94], xmm0
mov dword [ebp - 0x74], ecx
push ecx
lea eax, [eax + 0x428ae0]
mov byte [ebp - 4], 0x1a
push eax
lea ecx, [ebp - 0x948]
call fcn.004030d0
mov byte [ebp - 4], 0xf
mov ecx, dword [ebp - 0x74]
test ecx, ecx
je 0x4068b7
mov edx, dword [ecx]
lea eax, [ebp - 0x98]
cmp ecx, eax
setne al
movzx eax, al
push eax
call dword [edx + 0x10]
cmp byte [ebp - 0x94e], 0
jne 0x406967
mov eax, dword [ebp - 0x958]
mov esi, dword [ebp - 0x96c]
add eax, esi
mov dword [ebp - 0x958], eax
test esi, esi
jne 0x406831
mov ecx, dword [ebp - 0x94c]
cmp dword [ebp - 0x964], 0
je 0x406956
test esi, esi
jne 0x406900
mov eax, dword [ebp - 0x954]
xor edi, edi
jmp 0x4067d0
test ecx, ecx
jne 0x406908
cmp edi, esi
jl 0x406942
mov eax, edi
sub eax, ecx
cdq
idiv esi
test edx, edx
je 0x406942
mov ecx, esi
imul ecx, eax
mov eax, edi
lea ecx, [ecx + 0x428ae0]
add ecx, dword [ebp - 0x94c]
sub eax, ecx
add eax, 0x428ae0
push eax
push ecx
push 0x428ae0
call fcn.0040ac00
mov ecx, dword [ebp - 0x94c]
add esp, 0xc
sub edi, ecx
mov eax, edi
cdq
idiv esi
mov eax, dword [ebp - 0x954]
mov edi, edx
jmp 0x4067d0
push 0
lea ecx, [ebp - 0xa3c]
call fcn.004015f0
test al, al
jne 0x40696e
mov esi, 1
jmp 0x406970
xor esi, esi
mov byte [ebp - 4], 0x1f
mov eax, dword [ebp - 0x95c]
test eax, eax
je 0x406987
push eax
call fcn.0040be00
add esp, 4
mov byte [ebp - 4], 0x20
mov eax, dword [ebp - 0x960]
test eax, eax
je 0x40699e
push eax
call fcn.0040be00
add esp, 4
mov edx, dword [ebp - 0x98c]
test edx, edx
je 0x406a70
mov ecx, dword [ebp - 0x984]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffc
cmp ecx, 0x1000
jb 0x4069d5
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406cda
push ecx
push edx
call fcn.004081dc
mov dword [ebp - 0x98c], 0
mov dword [ebp - 0x988], 0
mov dword [ebp - 0x984], 0
jmp 0x406a6d
mov esi, dword [ebp - 0x94c]
push esi
push str.Error:_argument__d_is_invalid._n
push 2
call fcn.0040bc57
add esp, 4
push eax
call fcn.00404ba0
add esp, 0xc
mov esi, 1
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x406a70
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x406a4a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406cd5
push edx
push ecx
call fcn.004081dc
jmp 0x406a6d
push str.Error:_not_enough_arguments._n
push 2
call fcn.0040bc57
add esp, 4
push eax
call fcn.00404ba0
mov esi, 1
add esp, 8
mov edx, dword [ebp - 0x44]
cmp edx, 0x10
jb 0x406aa4
mov ecx, dword [ebp - 0x58]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x406a9a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406cda
push edx
push ecx
call fcn.004081dc
add esp, 8
mov edx, dword [ebp - 0x5c]
cmp edx, 0x10
jb 0x406ad8
mov ecx, dword [ebp - 0x70]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x406ace
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406cda
push edx
push ecx
call fcn.004081dc
add esp, 8
mov ecx, dword [ebp - 0xa4]
test ecx, ecx
je 0x406b30
mov edx, dword [ebp - 0x9c]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x406b08
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406cda
push edx
push ecx
call fcn.004081dc
add esp, 8
mov dword [ebp - 0xa4], 0
mov dword [ebp - 0xa0], 0
mov dword [ebp - 0x9c], 0
mov ecx, dword [ebp - 0xb0]
test ecx, ecx
je 0x406b88
mov edx, dword [ebp - 0xa8]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x406b60
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406cda
push edx
push ecx
call fcn.004081dc
add esp, 8
mov dword [ebp - 0xb0], 0
mov dword [ebp - 0xac], 0
mov dword [ebp - 0xa8], 0
lea ecx, [ebp - 0xe0]
call fcn.00402fb0
lea ecx, [ebp - 0x100]
call fcn.00402f30
mov edx, dword [ebp - 0x93c]
test edx, edx
je 0x406bf9
mov ecx, dword [ebp - 0x934]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffff8
cmp ecx, 0x1000
jb 0x406bd1
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406cda
push ecx
push edx
call fcn.004081dc
add esp, 8
mov dword [ebp - 0x93c], 0
mov dword [ebp - 0x938], 0
mov dword [ebp - 0x934], 0
mov ecx, dword [ebp - 0x9d8]
test ecx, ecx
je 0x406c51
mov edx, dword [ebp - 0x9d0]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x406c29
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406cda
push edx
push ecx
call fcn.004081dc
add esp, 8
mov dword [ebp - 0x9d8], 0
mov dword [ebp - 0x9d4], 0
mov dword [ebp - 0x9d0], 0
lea ecx, [ebp - 0x9f8]
call fcn.004011a0
lea ecx, [ebp - 0xa18]
call fcn.004011a0
lea ecx, [ebp - 0xa24]
call fcn.00401ff0
lea ecx, [ebp - 0xa30]
call fcn.00401ff0
mov ecx, dword [ebp - 0xa3c]
test ecx, ecx
je 0x406cb3
mov edx, dword [ebp - 0xa34]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x406ca9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406cda
push edx
push ecx
call fcn.004081dc
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040819e
mov esp, ebp
pop ebp
ret
call fcn.0040bb3e
call fcn.0040bb3e
call fcn.0040bb3e
int3