Function at 0x401120
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x33c
push ebx
push esi
push edi
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x40]
rep stosd dword es:[edi], eax
xor ebx, ebx
push str.CDX2APR_v1.0___The_CADIX_to_GraphiCode_Aperture_List_Converter_n
mov byte [esp + 0x17], 0
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
stosw word es:[edi], ax
call fcn.00401f6c
push str.Copyright__C__Graphicode__Inc._1991_2001__All_Rights_Reserved._n
call fcn.00401f6c
mov eax, dword [ebp + 8]
add esp, 8
cmp eax, 2
jl 0x401731
cmp eax, 3
jg 0x401731
mov esi, dword [ebp + 0xc]
mov eax, dword [esi + 4]
push eax
call fcn.0040aa0d
mov ecx, dword [esi + 4]
push ecx
call fcn.0040aa0d
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xd0]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x2e
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0xd4]
push ecx
call fcn.00401eb0
add esp, 0x10
test eax, eax
jne 0x4011fc
lea edi, [esp + 0xc8]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov eax, dword [str..APT]
not ecx
dec ecx
lea edx, [esp + ecx + 0xc8]
mov cl, byte [0x40c28c]
mov dword [edx], eax
mov byte [edx + 4], cl
lea edx, [esp + 0x230]
lea eax, [esp + 0xc8]
push edx
push 0
push eax
call fcn.004010d0
add esp, 0xc
lea ecx, [esp + 0xc8]
push 0x5c
push ecx
call fcn.00401e70
mov edx, eax
add esp, 8
test edx, edx
je 0x401231
inc edx
jmp 0x401253
lea edx, [esp + 0xc8]
push 0x3a
push edx
call fcn.00401e70
mov edx, eax
add esp, 8
test edx, edx
je 0x40124c
inc edx
jmp 0x401253
lea edx, [esp + 0xc8]
lea edi, [esp + 0x244]
or ecx, 0xffffffff
xor eax, eax
push 0x40c284
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0xcc]
push ecx
call fcn.00401e50
add esp, 8
mov dword [esp + 0x28], eax
test eax, eax
je 0x40170c
cmp dword [ebp + 8], 3
jne 0x4012b8
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 8]
push eax
call fcn.0040aa0d
add esp, 4
lea edx, [esp + 0x140]
mov edi, eax
jmp 0x4012c6
lea edi, [esp + 0xc8]
lea edx, [esp + 0x140]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x2e
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x144]
push ecx
call fcn.00401e70
add esp, 8
test eax, eax
jne 0x401317
lea edi, [esp + 0x140]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov edi, dword [str..APR]
not ecx
dec ecx
lea edx, [esp + ecx + 0x140]
jmp 0x401331
mov edi, dword [str..APR]
lea ecx, [esp + 0x140]
push 0x2e
push ecx
call fcn.00401e70
add esp, 8
mov edx, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0xc8]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x140]
push ecx
push edx
push str._nConverting_aperture_file___s__to___s_...
call fcn.00401f6c
mov edi, dword [esp + 0x34]
add esp, 0xc
xor esi, esi
mov al, byte [edi + 0xc]
mov dword [esp + 0x14], esi
test al, 0x10
jne 0x4013c0
push edi
lea eax, [esp + 0x1bc]
push 0x78
push eax
call section..text
lea ecx, [esp + 0x1c4]
push str.APT_No
push ecx
call fcn.00401db0
add esp, 0x14
test eax, eax
jne 0x4013ad
test byte [edi + 0xc], 0x10
je 0x40137c
jmp 0x4013c0
push edi
lea edx, [esp + 0x1bc]
push 0x78
push edx
call section..text
add esp, 0xc
lea eax, [esp + 0x140]
push 0x40c24c
push eax
mov dword [esp + 0x24], esi
call fcn.00401e50
add esp, 8
mov dword [esp + 0x2c], eax
push 8
lea ecx, [esp + 0x1bc]
push str.Aperture
push ecx
mov dword [esp + 0x48], esi
call fcn.0040a960
add esp, 0xc
test eax, eax
jne 0x401514
lea edx, [esp + 0x1b8]
mov ebx, 1
push 0x3d
push edx
mov dword [esp + 0x44], ebx
call fcn.00401eb0
add esp, 8
mov esi, eax
mov eax, dword [0x40c51c]
inc esi
cmp eax, ebx
jle 0x401437
movsx eax, byte [esi]
push 4
push eax
call fcn.00401d2d
add esp, 8
jmp 0x401446
movsx ecx, byte [esi]
mov edx, dword [str.________________________________H]
mov al, byte [edx + ecx*2]
and eax, 4
test eax, eax
jne 0x40141d
cmp dword [0x40c51c], ebx
jle 0x401462
movsx eax, byte [esi]
push 8
push eax
call fcn.00401d2d
add esp, 8
jmp 0x401471
movsx ecx, byte [esi]
mov edx, dword [str.________________________________H]
mov al, byte [edx + ecx*2]
and eax, 8
test eax, eax
jne 0x40141d
push 4
push str.RECT
push esi
call fcn.0040a960
add esp, 0xc
test eax, eax
jne 0x4014c9
lea eax, [esp + 0x18]
lea ecx, [esp + 0x13]
push eax
lea edx, [esp + 0x34]
push ecx
lea eax, [esp + 0x28]
push edx
push eax
add esi, 5
push str.__lf__lf__c_d
push esi
mov ebx, 4
call fcn.00401922
fld qword [esp + 0x38]
fcomp qword [esp + 0x48]
add esp, 0x18
fnstsw ax
test ah, 0x40
je 0x401514
mov ebx, 3
jmp 0x401514
push 5
push str.ROUND
push esi
call fcn.0040a960
add esp, 0xc
test eax, eax
jne 0x40150f
lea ecx, [esp + 0x18]
lea edx, [esp + 0x13]
push ecx
lea eax, [esp + 0x24]
push edx
push eax
add esi, 6
push str.__lf__c_d
push esi
call fcn.00401922
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
add esp, 0x14
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], edx
jmp 0x401514
mov ebx, 9
test byte [edi + 0xc], 0x10
jne 0x4016af
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x401695
fld qword [esp + 0x20]
mov eax, dword [esp + 0x1c]
fmul qword [0x40b0e0]
inc eax
mov dword [esp + 0x1c], eax
call fcn.00401ff0
fld qword [esp + 0x30]
fmul qword [0x40b0e0]
mov esi, eax
call fcn.00401ff0
mov edx, eax
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x88]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x1c]
mov ecx, 1
cmp eax, ecx
jne 0x4015fb
mov ax, word [esp + 0x18]
mov word [esp + 0x40], 0xf7
mov word [esp + 0x4a], ax
xor eax, eax
cmp ebx, 9
mov byte [esp + 0x44], cl
mov word [esp + 0x42], cx
mov word [esp + 0x4c], cx
mov word [esp + 0x4e], ax
mov byte [esp + 0x46], bl
je 0x4015af
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], edx
jmp 0x4015e7
mov ecx, dword [str.triangle.cap]
mov edx, dword [0x40c208]
mov dword [esp + 0x82], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x50], ecx
mov ecx, dword [0x40c20c]
mov dword [esp + 0x54], edx
mov dl, byte [0x40c210]
inc eax
mov dword [esp + 0x58], ecx
mov byte [esp + 0x5c], dl
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x40]
push eax
push ecx
call fcn.00401090
jmp 0x40168e
mov cx, word [esp + 0x18]
mov word [esp + 0x8e], ax
dec eax
cmp ebx, 9
mov word [esp + 0x8c], cx
mov word [esp + 0x90], ax
mov byte [esp + 0x88], bl
je 0x401635
mov dword [esp + 0x92], esi
mov dword [esp + 0x96], edx
jmp 0x40167c
mov eax, dword [0x40c208]
mov edx, dword [str.triangle.cap]
mov ecx, dword [0x40c20c]
mov dword [esp + 0x96], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x92], edx
mov dl, byte [0x40c210]
inc eax
mov dword [esp + 0x9a], ecx
mov byte [esp + 0x9e], dl
mov dword [esp + 0xc4], 0
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x88]
push eax
push ecx
call fcn.004010b0
mov edi, dword [esp + 0x30]
add esp, 8
push edi
lea edx, [esp + 0x1bc]
push 0x78
push edx
call section..text
add esp, 0xc
xor esi, esi
jmp 0x4013dd
mov esi, dword [esp + 0x2c]
push 0
push 0
push esi
call fcn.00401ca1
mov ax, word [esp + 0x28]
lea ecx, [esp + 0x4c]
push esi
push ecx
mov word [esp + 0x56], ax
call fcn.00401090
movsx eax, word [esp + 0x56]
mov edx, dword [esp + 0x28]
push edx
push eax
push str._n_d_Apertures_found___d_of_unknown_shape_n
call fcn.00401f6c
push edi
call fcn.00401c4b
push esi
call fcn.00401c4b
lea ecx, [esp + 0x258]
push ecx
call fcn.00401100
add esp, 0x2c
test eax, eax
jne 0x401728
jmp 0x401216
lea edx, [esp + 0xc8]
push edx
push str.Failed_to_open_input_file___s_
call fcn.00401f6c
add esp, 8
push 1
call fcn.00401b76
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push str.usage:_CDX2APR__aperture_file____outfile___n_n
call fcn.00401f6c
push str.Example:_n__To_convert_the_aperture_file__ALIST1.APT_
call fcn.00401f6c
push str.for_use_with_GraphiCode_products__type:_n____CDX2APR_ALIST1_n
call fcn.00401f6c
mov eax, dword [str..APR]
push eax
push str.This_creates_the_GraphiCode_aperture_wheel_file__ALIST1_s_._n
call fcn.00401f6c
mov ecx, dword [str..APR]
push ecx
push str.To_convert__ALIST1.APT__to__NEWALIST_s__type:_n
call fcn.00401f6c
push str.____CDX2APR_ALIST1_NEWALIST_n
call fcn.00401f6c
push str.To_convert_several_aperture_files_type:_n____CDX2APR_.APT_n
call fcn.00401f6c
add esp, 0x24
push 1
call fcn.00401b76
nop
nop